Created
October 25, 2020 12:08
-
-
Save viertelb/12cf9d74cbe0a08f9aa322d88171caa4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#logging is in /var/log/syslog | |
IP='192.168.100.102' | |
MAC='D0:50:99:0F:8E:E9' | |
SUCCESS='OMV alive, starting Mediathekview' | |
FAIL='ERROR - - - OMV down - - -,' | |
wakeonlan $MAC 2>&1 | logger & | |
sleep 30 | |
fping -c1 -t300 $IP 2>/dev/null 1>/dev/null | |
if [ "$?" = 0 ] | |
then | |
logger $SUCCESS | |
mediathekview 2>&1 | logger & | |
else | |
logger $FAIL | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment