saitam10

/etc/init.d/named.sh

Dec 21st, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. #export PATH=/usr/local/bind9/bin/:/usr/local/bind9/sbin/:$PATH
  2.  
  3. #chown root:root /usr/local/bind9/sbin/named
  4.  
  5. # No Debian adicionar no /etc/rc.local
  6. # /etc/init.d/named.sh start
  7. # chmod 755 /etc/init.d/named.sh
  8. # chmod +x /etc/init.d/named.sh
  9.  
  10. start() {
  11.   /usr/local/bind9/sbin/named
  12.   echo "Bind 9 started OK";
  13. }
  14. stop() {
  15.   killall named
  16.   echo "Bind 9 stop OK";
  17. }
  18. status(){
  19.   ps aux | grep named
  20. }
  21.  
  22. case "$1" in
  23.   "start") start ;;
  24.   "stop") stop ;;
  25.   "restart") stop; sleep 3; start ;;
  26.   "status") status ;;
  27.   *)
  28.   echo "Use: start|stop|restart|status";
  29. esac
Advertisement
Add Comment
Please, Sign In to add comment