#!/usr/bin/execlineb -P

# named starts as root and drops to the user from OPTIONS in
# /etc/default/named ("-u bind", Debian default); pid file and session key
# go to /run/named, which run-script-daemon creates for its DAEMON_USER
# (root) -- make it writable for the bind group first.
if { mkdir -p /run/named }
if { chown root:bind /run/named }
if { chmod 0775 /run/named }
run-script-daemon named
