postinst is in unbound 1.4.16-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 36 37 38 39 40 41 42 43 | #!/bin/sh -e
ROOT_TRUST_ANCHOR_UPDATE=false
ROOT_TRUST_ANCHOR_FILE=/var/lib/unbound/root.key
if [ -f /etc/default/unbound ]; then
. /etc/default/unbound
fi
if [ "$1" = configure ]; then
if ! getent passwd unbound >/dev/null; then
adduser --quiet --system --group --no-create-home --home /var/lib/unbound unbound
chown unbound:unbound /var/lib/unbound
fi
if [ -f /etc/default/unbound ]; then
. /etc/default/unbound
case "x$ROOT_TRUST_ANCHOR_UPDATE" in
xtrue|x1|xyes)
unbound-anchor -a "$ROOT_TRUST_ANCHOR_FILE" -v 2>&1 | logger -p daemon.info -t unbound-anchor
chown unbound:unbound "$ROOT_TRUST_ANCHOR_FILE" || true
;;
esac
fi
if [ ! -f /etc/unbound/unbound_control.key ]; then
unbound-control-setup 1>/dev/null 2>&1 || true
fi
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/unbound" ]; then
if [ ! -e "/etc/init/unbound.conf" ]; then
update-rc.d unbound defaults >/dev/null
fi
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
invoke-rc.d unbound $_dh_action || true
fi
# End automatically added section
|