Advertisement
diggidre

record-reboot-ping_cam1.sh

Dec 18th, 2018
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/sh
  2. # record-reboot-ping_cam1.sh
  3. # Check if Cam is alive since reboot and if error code is 1 (offline) then start record-ping-reboot-waitfor_xxx.sh
  4. # and save ping's PID to file
  5. #
  6. IPCAM=address
  7. ping -w 86400 -i2 $IPCAM 0>/dev/null
  8. OFFLINE=$?
  9. if [ $OFFLINE -eq 1 ]
  10. then
  11.   echo ""
  12. else
  13.   bash /home/xxx/scripts/record-ping-reboot-waitfor_cam1.sh
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement