File: postinst

package info (click to toggle)
bnetd 0.4.25-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,516 kB
  • ctags: 7,224
  • sloc: ansic: 67,547; sh: 3,142; makefile: 796; python: 304; perl: 211; awk: 73
file content (28 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
        # continue below
    ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

for dir in /var/lib/bnetd/player /var/lib/bnetd/reports /var/lib/bnetd/chanlogs /var/run/bnetd; do
	chown games $dir
done

# postrms prior to 0.4.25-3 had a bug which created an empty
# /etc/bnetd/users directory, which we don't need.
if [ -d /etc/bnetd/users ]; then
	rmdir --ignore-fail-on-non-empty /etc/bnetd/users
fi

#DEBHELPER#

exit 0