From: Wilfried Göesgens Date: Tue, 23 Jan 2007 20:09:50 +0000 (+0000) Subject: * create user and directories needed in common package. X-Git-Tag: v7.86~3624 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=8dbf8473c352b9c9e87290595aac0e33912732d8;p=citadel.git * create user and directories needed in common package. --- diff --git a/citadel/debian/citadel-common.dirs b/citadel/debian/citadel-common.dirs new file mode 100644 index 000000000..3488215ef --- /dev/null +++ b/citadel/debian/citadel-common.dirs @@ -0,0 +1 @@ +etc/citadel \ No newline at end of file diff --git a/citadel/debian/citadel-common.postinst b/citadel/debian/citadel-common.postinst new file mode 100644 index 000000000..37c560c0f --- /dev/null +++ b/citadel/debian/citadel-common.postinst @@ -0,0 +1,35 @@ +#!/bin/sh +# postinst script for citadel-server +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule +db_version 2.0 + +case "$1" in + configure) + if ! getent group citadel >/dev/null; then + groupadd citadel + fi + + if ! getent passwd citadel >/dev/null; then + adduser --system --ingroup citadel --home /var/lib/citadel \ + --gecos "Citadel system user" --shell /bin/sh \ + --disabled-password citadel + fi + + chown -R citadel:citadel /etc/citadel + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0