diff options
author | root <root@rshg047.dnsready.net> | 2011-05-23 22:47:30 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-05-23 22:47:30 +0000 |
commit | 87e20a64534e8f58ca4a4f84000b629e48569a98 (patch) | |
tree | 8c4b498a38d72459c7bc88bc02719b4849159d0f /testing/bind/install | |
parent | 3837a11a2a471b9db222d8eb6ed7d2fb9d1778c6 (diff) |
Mon May 23 22:47:30 UTC 2011
Diffstat (limited to 'testing/bind/install')
-rw-r--r-- | testing/bind/install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/bind/install b/testing/bind/install new file mode 100644 index 000000000..e3a1397cb --- /dev/null +++ b/testing/bind/install @@ -0,0 +1,21 @@ +post_install() { + getent group named >/dev/null || groupadd -g 40 named + getent passwd named >/dev/null || useradd -u 40 -c "BIND DNS Server" -g named -d /var/named -s /bin/false named + passwd -l named &>/dev/null + + touch var/log/named.log + chown named:named var/log/named.log + + # create an rndc.key if it doesn't already exist + if [ ! -s etc/rndc.key ]; then + usr/sbin/rndc-confgen -r /dev/urandom -b 256 | head -n 5 >>etc/rndc.key + chown root:named etc/rndc.key + chmod 640 etc/rndc.key + fi +} + +pre_remove() { + getent passwd named &>/dev/null && userdel named >/dev/null + getent group named &>/dev/null && groupdel named >/dev/null + return 0 +} |