Skip to content

Instantly share code, notes, and snippets.

@viertelb
Created October 25, 2020 12:08
Show Gist options
  • Save viertelb/12cf9d74cbe0a08f9aa322d88171caa4 to your computer and use it in GitHub Desktop.
Save viertelb/12cf9d74cbe0a08f9aa322d88171caa4 to your computer and use it in GitHub Desktop.
#!/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