Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
Author[]Andy Green <andy@warmcat.com> 2025-05-14 10:15 UTC
Committer[]Andy Green <andy@warmcat.com> 2025-05-14 12:07 UTC
Tree2cfe3ff453b0118a4da78b9003e90479a4a818cb   Raw Patch
 
sai-power: add example init
sai-power: add example init
diff --git a/etc-sai-EXAMPLE/power/conf b/etc-sai-EXAMPLE/power/conf new file mode 100644 index 0000000..515bea0 --- /dev/null +++ b/etc-sai-EXAMPLE/power/conf @@ -0,0 +1,34 @@ +{ + "perms": "sai:nobody", + + "servers": [ + { + "url" : "wss://libwebsockets.org:4444/sai/builder", + + "platforms": [ + { + "name": "rocky9/x86_64-amd/gcc", + "power-on": { + "type": "wol", + "mac": "00:e0:4c:68:01:30" + }, + "power-off": { + "type": "suspend" + } + }, + { + "name": "rocky9/aarch64-a72a55-rk3588/gcc", + "power-on": { + "type": "tasmota", + "url": "http://10.199.0.240/cm?cmnd=Power%20On" + }, + "power-off": { + "type": "tasmota", + "url": "http://10.199.0.240/cm?cmnd=Power%20Off" + } + } + ] + } + ] +} + diff --git a/scripts/sai-power.service b/scripts/sai-power.service new file mode 100644 index 0000000..8c6f5b6 --- /dev/null +++ b/scripts/sai-power.service @@ -0,0 +1,10 @@ +[Unit] +Description=Sai power + +[Service] +Environment="LWS_NTP_SERVER=192.168.4.1" +ExecStart=/usr/local/bin/sai-power + +[Install] +WantedBy=multi-user.target +
Page fetched 0s ago, creation time: 1ms (vhost etag hits: 0%, cache hits: 0%)