subnet 192.168.1.0 netmask 255.255.255.0 {
on commit {
set ip = binary-to-ascii (10, 8, ".", leased-address);
execute ("/usr/local/bin/on-device-connect", "commit", ip);
}
}
I have setup exactly this to automate stuff unlocking the door in my office (in the morning, whenever some one arrives and phone connects to wifi).My original source: http://jpmens.net/2011/07/06/execute-a-script-when-isc-dhcp-...
Edit: Fix code formatting.