* more changes towards the debian.org packaging.
[citadel.git] / citadel / debian / citadel-client.postinst
1 #! /bin/sh
2 # Abort if any command returns an error value
3 set -e
4
5 case "$1" in
6   configure)
7     if ! getent group citadel >/dev/null; then 
8                 groupadd citadel
9         fi
10         if ! getent passwd citadel >/dev/null; then 
11                 adduser --system --ingroup citadel --home /var/lib/citadel \
12                         --gecos "Citadel system user" --shell /bin/sh \
13                         --disabled-password citadel
14         fi
15         mkdir -p /etc/citadel
16         chown citadel:citadel /etc/citadel/citadel.rc
17         ;;
18   abort-upgrade|abort-remove|abort-deconfigure)
19     ;;
20   *) echo "$0: didn't understand being called with \`$1'" 1>&2
21      exit 1;;
22 esac
23
24 #DEBHELPER#
25 exit 0