cacert-boardvoting/debian/cacert-boardvoting.postinst

32 lines
617 B
Text
Raw Normal View History

2019-08-01 12:21:29 +00:00
#!/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