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.

36 lines
850 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. config_file=/etc/bind/named.conf
  13. fix_perms() {
  14. for dir in $libdir $logdir $cachedir; do
  15. test -e "$dir" || {
  16. mkdir -p "$dir"
  17. chgrp bind "$dir"
  18. chmod g+w "$dir"
  19. }
  20. done
  21. }
  22. start_service() {
  23. user_exists bind 57 || user_add bind 57
  24. group_exists bind 57 || group_add bind 57
  25. fix_perms
  26. procd_open_instance
  27. procd_set_param command /usr/sbin/named -u bind -f -c $config_file
  28. procd_set_param respawn
  29. procd_close_instance
  30. }