many changes

This commit is contained in:
2024-07-08 17:36:11 +02:00
parent 213101f8cd
commit 4a183af66c
9 changed files with 85 additions and 73 deletions

View File

@@ -117,6 +117,7 @@ let
"\"shellybulbduo-toilet-1.cloonar.smart IN A 10.42.100.82\""
# storage
"\"shelly1-storage-1.cloonar.smart IN A 10.42.100.97\""
"\"shellyplug-storage-1.cloonar.smart IN A 10.42.100.98\""
"\"ddl-warez.to IN A 172.67.184.30\""
"\"cdnjs.cloudflare.com IN A 104.17.24.14\""

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
let
wolScript = pkgs.writeScriptBin "wol-script" ''
IP=$(cat /var/lib/kea/dhcp4.leases | grep $1 | awk -F, '{print $1}' | tail -n 1);
IP=$(cat /var/lib/kea/dhcp4.leases | grep $1 | awk -F, '{print $1}' | awk -F. 'OFS="." {print $1,$2,$3,255}' | tail -n 1);
MAC=$(cat /var/lib/kea/dhcp4.leases | grep $1 | awk -F, '{print $2}' | tail -n 1);
${pkgs.wol}/bin/wol -i $IP $MAC
'';