bundlewrap/hooks/wake_on_lan.py
CroneKorkN 730625e36c
libs/hooks/bin: add one-line module docstrings and # purpose: headers
every libs/*.py and hooks/*.py now starts with a one-line module
docstring; every bin/* script starts with a `# purpose:` header.
discovery-by-`ls`-and-read instead of by index.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:36:19 +02:00

11 lines
297 B
Python

"""wake_on_lan: pre-apply / pre-run hook that wakes a node via libs.wol before bw connects to it."""
def wake_on_lan(node):
node.repo.libs.wol.wake(node)
def node_apply_start(repo, node, **kwargs):
wake_on_lan(node)
def node_run_start(repo, node, cmd, **kwargs):
wake_on_lan(node)