wol-utils/wol.sh

16 lines
367 B
Bash
Raw Normal View History

2025-02-09 23:45:36 +01:00
#!/bin/sh
set -euo pipefail
TARGETS=(
"origan (staging): 00:23:24:af:fd:ec"
"onion (prod): 00:23:24:b0:e8:66"
"oseille (prod): 00:23:24:af:f9:0b"
"ortie (prod): 00:23:24:b0:01:b9"
)
MACS=$(gum choose --no-limit "${TARGETS[@]}" | sed 's/^[^:]*: *//')
[ -z "$MACS" ] && echo You must select at least one server to wake up && exit 1
wakeonlan -- $MACS