Advertisement
diggidre

Bash prüfen ob Kamera wieder erreichbar

Dec 10th, 2018
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. #!/bin/sh
  2. # record-ping-waitfor_cam1.sh
  3. # Check if Cam is alive again, if yes (ping exit code 0) then execute record-ping-reconnect_xxx.sh
  4. #
  5. HOST=192.168.178.xxx
  6. #
  7. ping -w 86400 -i5 $HOST 1>/dev/null
  8. ONLINE=$?
  9. #
  10. if [ $ONLINE -eq 0 ]
  11. then
  12.   echo "nicht erreichbar"
  13. else
  14.   sudo bash /home/xxx/scripts/nocron/record-ping-reconnect_cam1.sh
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement