summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-11 10:36:29 +0200
committerPaul Buetow <paul@buetow.org>2026-01-11 10:36:29 +0200
commit88141eb06849980425dc668095c4b7db061d7147 (patch)
tree61a5b6334f08d68e9ce111381dcfab6171a31a18
parent328f6d216855fd86e65674adc33af5f19bb018a1 (diff)
add wol
-rwxr-xr-xdotfiles/scripts/wol-f3s55
1 files changed, 55 insertions, 0 deletions
diff --git a/dotfiles/scripts/wol-f3s b/dotfiles/scripts/wol-f3s
new file mode 100755
index 0000000..666f691
--- /dev/null
+++ b/dotfiles/scripts/wol-f3s
@@ -0,0 +1,55 @@
+#!/bin/bash
+# Wake-on-LAN script for f3s cluster (f0, f1, f2)
+#
+# Usage:
+# wol-f3s # Wake all three Beelinks
+# wol-f3s f0 # Wake only f0
+# wol-f3s f1 # Wake only f1
+# wol-f3s f2 # Wake only f2
+
+# MAC addresses (fill these in after getting them from the Beelinks)
+# Run: ssh paul@192.168.1.130 "ifconfig re0 | grep ether" to get each MAC
+F0_MAC="e8:ff:1e:d7:1c:ac" # f0 (192.168.1.130)
+F1_MAC="e8:ff:1e:d7:1e:44" # f1 (192.168.1.131)
+F2_MAC="e8:ff:1e:d7:1c:a0" # f2 (192.168.1.132)
+
+# Broadcast address for your LAN
+BROADCAST="192.168.1.255"
+
+wake() {
+ local name=$1
+ local mac=$2
+
+ if [[ "$mac" == "XX:XX:XX:XX:XX:XX" ]]; then
+ echo "⚠️ $name MAC address not configured yet"
+ return 1
+ fi
+
+ echo "Sending WoL packet to $name ($mac)..."
+ wol -i "$BROADCAST" "$mac"
+}
+
+case "${1:-all}" in
+ f0)
+ wake "f0" "$F0_MAC"
+ ;;
+ f1)
+ wake "f1" "$F1_MAC"
+ ;;
+ f2)
+ wake "f2" "$F2_MAC"
+ ;;
+ all|"")
+ wake "f0" "$F0_MAC"
+ wake "f1" "$F1_MAC"
+ wake "f2" "$F2_MAC"
+ ;;
+ *)
+ echo "Usage: $0 [f0|f1|f2|all]"
+ exit 1
+ ;;
+esac
+
+echo ""
+echo "✓ WoL packets sent. Machines should boot in a few seconds."
+echo " Wait ~30 seconds, then try: ssh paul@192.168.1.130"