summaryrefslogtreecommitdiffstats
path: root/abs/core/supplemental-web/wakeonlan.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/supplemental-web/wakeonlan.sh')
-rw-r--r--abs/core/supplemental-web/wakeonlan.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/abs/core/supplemental-web/wakeonlan.sh b/abs/core/supplemental-web/wakeonlan.sh
index 1213f79..7734401 100644
--- a/abs/core/supplemental-web/wakeonlan.sh
+++ b/abs/core/supplemental-web/wakeonlan.sh
@@ -1,12 +1,17 @@
#!/bin/bash
-HWADDR=`curl -s http://localhost/xymon/hobbit-cgi/svcstatus.sh?CLIENT=$1|grep HWaddr|tr -s [:space:]| cut -d" " -f5|uniq`
-
-#for mac in `grep HW "$DIR/$FILE" |awk '{ print $5 } '`
+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 "/usr/bin/wol -v $mac"
- /usr/bin/wol -v $mac
+ echo
+ echo "####################################################"
+ echo "wol: $mac"
+ /usr/bin/wol -v $mac
+ echo
+ echo "etherwake: $mac "
+ sudo /usr/sbin/etherwake -D $mac 2>&1
+ echo "####################################################"
done
-
+