Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # record-ping-reboot-waitfor_cam1.sh
- # Check if Cam is alive or reachable, if yes (ping exit code 0) then execute record-reconnect_xxx.sh
- #
- # Ping in an infintive loop - as soon as reachable (exit code 0) then go on with record script
- sleep 40s
- IPCAM=address
- while true; do ping -c1 $IPCAM > /dev/null && break; done
- ONLINE=$?
- if [ $ONLINE -eq 0 ]
- then
- bash /home/xxx/scripts/record-reboot_cam1.sh
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement