wakeup hook
This commit is contained in:
parent
cf6e716301
commit
fab4d0a476
2 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,7 @@ def wake_command(metadata):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'wol-sleeper': {
|
'wol-sleeper': {
|
||||||
'wake_command': f"ssh wol@{waker_hostname} 'wakeonlan {mac} && while ! ping {ip} -c1 -W3; do true; done'",
|
'wake_command': f"ssh -o StrictHostKeyChecking=no wol@{waker_hostname} 'wakeonlan {mac} && while ! ping {ip} -c1 -W3; do true; done'",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
hooks/wake_on_lan.py
Normal file
5
hooks/wake_on_lan.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from bundlewrap.operations import run_local
|
||||||
|
|
||||||
|
def node_apply_start(repo, node, interactive=False, **kwargs):
|
||||||
|
if node.has_bundle('wol-sleeper'):
|
||||||
|
repo.get_node(node.metadata.get('wol-sleeper/waker')).run(node.metadata.get('wol-sleeper/wake_command'))
|
Loading…
Reference in a new issue