Advertisement
tolikpunkoff

stop-pxe

Mar 7th, 2019
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Stopping TFTP server..."
  4. pkill in.tftpd
  5. sleep 5
  6.  
  7. echo "Stopping DHCP daemon..."
  8. pkill  dhcpd
  9. sleep 5
  10.  
  11. echo "Restore DHCP daemon original config file..."
  12. #original config must be in current dir.
  13. CURDIR=`pwd`
  14. cp "$CURDIR/dhcpd.conf.orig" /etc/dhcpd.conf
  15.  
  16. echo "Stopping samba server"
  17. /etc/rc.d/rc.samba stop
  18. chmod 644 /etc/rc.d/rc.samba
  19. sleep 5
  20.  
  21. #stop NFS
  22. echo "Stopping NFS..."
  23. ip netns exec provns /etc/rc.d/rc.nfsd stop
  24. chmod 644 /etc/rc.d/rc.nfsd
  25. chmod 644 /etc/rc.d/rc.rpc
  26. sleep 5
  27.  
  28. echo "Complete!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement