MartijnBraam / python-isc-dhcp-leases

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monitor lease changes

thijstriemstra opened this issue · comments

It would be nice to have an example or utility that shows how to get notified when the lease changes (e.g. new host connects).

Thats not really in the scope of this module since that would depends a lot on how the rest of your application works, it can be done in multiple ways. the DHCP server can execute a script on lease changes and that could trigger a task, or you can watch the lease file itself with the inotify module in python.

Thanks for the feedback.