added contrib files

This commit is contained in:
Bart Sjerps
2026-06-06 20:00:50 +02:00
parent d805a5d27b
commit f77387ad1b
5 changed files with 104 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
API_KEY=
URL=https://phantom1.lan:53443
awk '{print $2,$6,$8}' dhcp.static | tr -d \; | grep '192.168.2\.' | while read -r domain mac ipaddr; do
echo -n "$domain|$mac|$ipaddr"
curl --insecure --silent --header "Authorization: Bearer $API_KEY" "$URL/api/dhcp/scopes/addReservedLease?name=dhcp2&hardwareAddress=$mac&ipAddress=$ipaddr&hostName=$domain"
echo
done