item4.sh 900 B

123456789101112131415
  1. #!/bin/bash
  2. #Item4 Watchdog
  3. # get watchdog file proc-wdtd.conf
  4. # get watchdog file proc-wdtd
  5. # get watchdog file rc.local
  6. cd /home/使用者;pwd;sudo git clone -b procwdtdconf --single-branch http://60.250.156.230:3000/fatwolf/proc.git /home/使用者/procwdtdconf/;sudo git clone -b procwdtd --single-branch http://60.250.156.230:3000/fatwolf/proc.git /home/使用者/procwdtd/;sudo git clone -b rclocal --single-branch http://60.250.156.230:3000/fatwolf/proc.git /home/使用者/rclocal/;sudo mv /home/使用者/procwdtdconf/proc-wdtd.conf /etc/;sudo mv /home/使用者/procwdtd/proc-wdtd /usr/sbin/;sudo mv /home/使用者/rclocal/rc.local /etc/;sudo rm -rf /home/使用者/procwdtdconf/;sudo rm -rf /home/使用者/procwdtd/;sudo rm -rf /home/使用者/rclocal/
  7. sudo chmod +x /usr/sbin/proc-wdtd
  8. sudo chmod +x /etc/rc.local
  9. sudo systemctl restart rc-local.service
  10. echo "watchdog file done"