You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
817 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2014 Noah Meyerhans <frodo@morgul.net>
  3. # Licensed under the terms of the GNU General Public License version 2
  4. # or (at your discretion) any later later version
  5. USE_PROCD=1
  6. START=50
  7. config_file=/etc/bind/named.conf
  8. pid_file=/var/run/named/named.pid
  9. logdir=/var/log/named/
  10. cachedir=/var/cache/bind
  11. libdir=/var/lib/bind
  12. fix_perms() {
  13. for dir in $libdir $logdir $cachedir; do
  14. test -e "$dir" || {
  15. mkdir -p "$dir"
  16. chgrp bind "$dir"
  17. chmod g+w "$dir"
  18. }
  19. done
  20. }
  21. start_service() {
  22. user_exists bind 57 || user_add bind 57
  23. group_exists bind 57 || group_add bind 57
  24. fix_perms
  25. procd_open_instance
  26. procd_set_param command /usr/sbin/named -u bind -f -c $config_file
  27. procd_set_param respawn
  28. procd_close_instance
  29. }