#!/bin/sh set -e #DEBHELPER# case "$1" in configure) OLDVERSION="$2" # see below ;; abort-upgrade) exit 0 ;; abort-remove|abort-deconfigure) exit 0 ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # lets give them a bind user/group in all cases. getent group bind >/dev/null 2>&1 || addgroup --system bind getent passwd bind >/dev/null 2>&1 || adduser --system --home /var/cache/bind --no-create-home \ --disabled-password --ingroup bind bind if [ ! -s /etc/bind/rndc.key ] && [ -x /usr/sbin/rndc-confgen ]; then rndc-confgen -r /dev/urandom -a fi if pidof /usr/sbin/lwresd >/dev/null 2>&1; then invoke-rc.d lwresd restart else invoke-rc.d lwresd start fi