MartijnBraam / python-isc-dhcp-leases

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server
MIT License
123 stars 47 forks source link

Monitor lease changes #23

Closed thijstriemstra closed 6 years ago

thijstriemstra commented 7 years ago

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).

MartijnBraam commented 6 years ago

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.

thijstriemstra commented 6 years ago

Thanks for the feedback.