pdnsd.rc8 573 B

12345678910111213141516171819202122232425262728
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2016 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. pidfile="/run/pdnsd.pid"
  5. command="/usr/sbin/pdnsd"
  6. command_args="-s -t -d -p ${pidfile} ${PDNSDCONFIG}"
  7. extra_started_commands="reload"
  8. depend() {
  9. use net
  10. provide dns
  11. }
  12. start_pre() {
  13. if [ ! -e /etc/pdnsd/pdnsd.conf ] ; then
  14. eerror "You need an /etc/pdnsd/pdnsd.conf file first."
  15. eerror "There is a sample in /etc/pdnsd/pdnsd.conf.sample"
  16. return 1
  17. fi
  18. }
  19. reload() {
  20. ebegin "Reloading pdnsd.conf"
  21. /usr/sbin/pdnsd-ctl config
  22. eend $?
  23. }