diff options
Diffstat (limited to 'debian/cacert-boardvoting.postinst')
-rw-r--r-- | debian/cacert-boardvoting.postinst | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/cacert-boardvoting.postinst b/debian/cacert-boardvoting.postinst new file mode 100644 index 0000000..8d9c5fb --- /dev/null +++ b/debian/cacert-boardvoting.postinst @@ -0,0 +1,31 @@ +#!/bin/sh +# +# postinst script for cacert-boardvoting +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + configure) + adduser --system --quiet --home /srv/cacert-boardvoting cacert-boardvoting + DATADIR=/srv/cacert-boardvoting/data + if [ -d "${DATADIR}" ]; then + chown -R cacert-boardvoting "${DATADIR}" + else + install -d --owner cacert-boardvoting --mode 0700 "${DATADIR}" + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 |