#!/bin/bash hosts=$(scontrol show hostnames "$1") logfile=/var/log/power_save.log echo "$(date) Resume invoked $0 $*" >>$logfile for host in $hosts do hostMac=$(saturnDiscover lookup hostmac $host) sudo wol $hostMac done exit 0