zorun / kea-hook-runscript

This a hook for the Kea DHCP server that allows to run an external script at various points in the processing of DHCP requests and responses.
Mozilla Public License 2.0
54 stars 23 forks source link

Make waiting for script call to finish optional #4

Closed salanki closed 6 years ago

salanki commented 6 years ago

Adds a hook script parameter wait (defaults to true) to optionally not wait for the called script to finish. As the called script doesn't alter the behavior of the DHCP server it doesn't really make sense to wait for it to finish in a lot of cases, speeding up DHCP processing.

The parameter is optional and will maintain the old behavior of waiting if not defined.

Example configuration:

    "hooks-libraries": [
      {
        "library": "/usr/local/lib/hooks/kea-hook-runscript.so",
        "parameters": {
          "script": "/usr/local/etc/kea/hooks/napi.sh",
          "wait": false
        }
      }
    ]
zorun commented 6 years ago

Looks good, thanks a lot for the contribution!