blob: 7734401ed8a2053e8bc9a8beb0a58ce2f9265766 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
echo "Wake on lan attempt for $1"
HWADDR=`curl -s http://localhost/xymon/hobbit-cgi/svcstatus.sh?CLIENT=$1|grep ether|grep txq|tr -s [:space:]| cut -d" " -f3|uniq`
for mac in $HWADDR
do
echo
echo "####################################################"
echo "wol: $mac"
/usr/bin/wol -v $mac
echo
echo "etherwake: $mac "
sudo /usr/sbin/etherwake -D $mac 2>&1
echo "####################################################"
done
|