Files
technitium/contrib/technitium_mac
T

13 lines
382 B
Bash
Raw Normal View History

2026-06-06 20:00:50 +02:00
#!/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