SYSLOGD_SCRIPT=/etc/init.d/syslogd
SYSLOGD_CONFIG=/etc/sysconfig/syslogd
if grep -qs '^SYSLOGD_OPTIONS=.*-a /var/lib/bind/dev/log' "$SYSLOGD_CONFIG"; then
# Remove artefacts of pre-syslog.d epoch.
sed -i 's|^\(SYSLOGD_OPTIONS=.*\) \?-a /var/lib/bind/dev/log|\1|' "$SYSLOGD_CONFIG"
if [ -x "$SYSLOGD_SCRIPT" ]; then
"$SYSLOGD_SCRIPT" condreload ||:
fi
fi
if [ $1 -ge 2 ]; then
/usr/sbin/control-restore bind-chroot
else
for facility in bind-chroot; do
/usr/sbin/control "$facility" enabled
done
fi
if [ $1 -ge 2 ]; then
/usr/sbin/control-restore bind-debug bind-slave bind-caps
else
for facility in bind-debug bind-slave bind-caps; do
/usr/sbin/control "$facility" disabled
done
fi
# next section is the copy of post_service, but
# it doesn't restart named since this is responsibility of filetrigger
SYSTEMCTL=systemctl
if sd_booted && "$SYSTEMCTL" --version >/dev/null 2>&1; then
"$SYSTEMCTL" daemon-reload
if [ "$1" -eq 1 ]; then
"$SYSTEMCTL" -q preset bind
fi
else
if [ "$1" -eq 1 ]; then
chkconfig --add bind
else
chkconfig bind resetpriorities
fi
fi