Reputation: 2658
I want to run a script in the server after the isc-dhcp-server send the DHCPACK packet to client.
The only solution I get is running a script to retrieve the dhcp log, but it is not efficient.
Any other ways?
Upvotes: 1
Views: 1598
Reputation: 2658
thks, I found that
REFERENCE: EVENTS There are three kinds of events that can happen regarding a lease, and it is possible to declare statements that occur when any of these events happen. These events are the commit event, when the server has made a commitment of a certain lease to a client, the release event, when the client has released the server from its commitment, and the expiry event, when the commitment expires.
To declare a set of statements to execute when an event happens, you must use the on statement, followed by the name of the event, followed by a series of statements to execute when the event happens, enclosed in braces.
the link is: https://www.isc.org/wp-content/uploads/2018/02/dhcp44.html#REFERENCE:%20EVENTS
and the example is: https://jpmens.net/2011/07/06/execute-a-script-when-isc-dhcp-hands-out-a-new-lease/
Upvotes: 1