1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
set -e
if [ -n "$PDNSDEBUG" ]; then
echo "now debugging $0 $@"
set -x
fi
case "$1" in
configure)
addgroup --quiet --system pdns
adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
if [ "$2" = "" ]; then
# Only for new installs. Assume admins know what they are doing.
# mode 0640 is set by dpkg on initial unpack.
chown root:pdns /etc/powerdns/pdns.conf || true
fi
;;
triggered)
invoke-rc.d pdns restart || :
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
|