#!/bin/sh

WAKEONLAN=wakeonlan
MAC=00:11:22:33:44:55

retval=1

if $WAKEONLAN -i 127.0.0.1 $MAC | grep -q "Sending magic packet to 127.0.0.1:9 with 00:11:22:33:44:55" ; then
    echo success: Calling $WAKEONLAN worked.
    retval=0
else
    echo error: Calling $WAKEONLAN failed.
fi

exit $retval
