* added patches from Fathi boudra
[citadel.git] / citadel / debian / citadel-client.postinst
1 #! /bin/sh
2 # postinst.skeleton
3 # Skeleton maintainer script showing all the possible cases.
4 # Written by Charles Briscoe-Smith, March-June 1998.  Public Domain.
5
6 # Abort if any command returns an error value
7 set -e
8
9 case "$1" in
10   configure)
11     # Configure this package.  If the package must prompt the user for
12     # information, do it here.
13     if ! getent group citadel >/dev/null; then 
14                 groupadd citadel
15         fi
16         if ! getent passwd citadel >/dev/null; then 
17                 adduser --system --ingroup citadel --home /var/lib/citadel \
18                         --gecos "Citadel system user" --shell /bin/sh \
19                         --disabled-password citadel
20         fi
21         mkdir -p /etc/citadel
22         chown citadel:citadel /etc/citadel/citadel.rc
23         ;;
24   abort-upgrade|abort-remove|abort-deconfigure)
25     ;;
26   *) echo "$0: didn't understand being called with \`$1'" 1>&2
27      exit 0;;
28 esac
29
30 exit 0