'Network User' is now 'Normal User'
[citadel.git] / citadel / debian / citadel-common.postinst
1 #!/bin/sh
2 # postinst script for citadel-server
3 set -e
4
5 # source debconf stuff
6 . /usr/share/debconf/confmodule
7 db_version 2.0
8
9 case "$1" in
10     configure)
11         if ! getent group citadel >/dev/null; then 
12             addgroup --system citadel
13         fi
14
15         if ! getent passwd citadel >/dev/null; then 
16             adduser --system --ingroup citadel --home /var/lib/citadel \
17                     --gecos "Citadel system user" --shell /bin/sh \
18                     --disabled-password --no-create-home --shell /bin/false citadel
19         fi
20
21         chown -R citadel:citadel /etc/citadel
22     ;;
23
24     abort-upgrade|abort-remove|abort-deconfigure)
25     ;;
26
27     *)
28         echo "postinst called with unknown argument \`$1'" >&2
29         exit 1
30     ;;
31 esac
32
33 #DEBHELPER#
34
35 exit 0