SHARE
TWEET

stop-pxe

tolikpunkoff Mar 7th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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!"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top