tlu/salt/states/wol/files/wol.jinja

19 lines
337 B
Plaintext
Raw Normal View History

2021-10-16 13:59:28 +00:00
#/bin/bash
set -aeou pipefail
for arg in "$@"
do
case "$arg" in
{% for number, mac in pillar['network']['wol'].items() %}
{{ number }}|srv{{ number }}|server{{ number }})
2021-10-17 11:55:21 +00:00
sudo ether-wake -i {{ pillar['network']['bridge'] }} {{ mac }}
2021-10-16 13:59:28 +00:00
;;
{% endfor %}
*)
echo "unknown: $arg"
;;
esac
done