* some cleanup and debian code beautification (tab/space/indentation)
[citadel.git] / citadel / debian / citadel-client.postinst
1 #!/bin/sh
2 # postinst script for citadel-client
3
4 set -e
5
6 case "$1" in
7     configure)
8         if ! getent group citadel >/dev/null; then 
9             groupadd citadel
10         fi
11
12         if ! getent passwd citadel >/dev/null; then 
13             adduser --system --ingroup citadel --home /var/lib/citadel \
14                     --gecos "Citadel system user" --shell /bin/sh \
15                     --disabled-password citadel
16         fi
17
18         mkdir -p /etc/citadel
19         chown citadel:citadel /etc/citadel/citadel.rc
20     ;;
21
22     abort-upgrade|abort-remove|abort-deconfigure)
23     ;;
24
25     *)
26         echo "postinst called with unknown argument \`$1'" >&2
27         exit 1
28     ;;
29 esac
30
31 #DEBHELPER#
32
33 exit 0