Skip to Content
Browse documentation

Hooks — Custom Operation Scripts

Extend selected Eenos account and DNS operations with local pre/post scripts, supported events, payload decoding and source-verified execution behavior.

Hooks let a server administrator run custom local scripts at explicit points in selected Eenos operations. Use them for follow-up notifications, external DNS coordination or integration work. They are a separate extension mechanism from the HTTP APIs and EAPI.

Start here

  1. Read Writing and Installing Hooks for discovery, permissions, ordering and failure behavior.
  2. Use Hook Arguments and Payloads for standalone Python/PHP decoders and an offline sample.
  3. Select the event reference and check its actual timing and payload before connecting an external system.

Available events

Hook nameActionsReference
dnsCREATE, UPDATE, DELETE on supported callersDNS Hooks
createacctCREATEAccount Creation
suspendacctUPDATEAccount Suspension
unsuspendacctUPDATEAccount Unsuspension
removeacctDELETEAccount Removal

Each has pre and post directories under /var/eenos/hooks/HOOK_NAME/. Creating another directory name does not create a new event: Eenos must explicitly call that hook name. Use the lowercase names shown above.

Understand the contract

Scripts receive base64 JSON data and action/panel metadata as command-line arguments. They run sequentially in filename order, in the calling process's OS context. The user argument identifies an account; it does not switch the script's OS user.

Pre/post describes a position in the caller, not a transaction boundary. Some pre-hooks run after configuration writes. Some post-hooks can run after a failed operation branch. Hook exit codes are ignored by the dispatcher, so a pre-hook cannot approve, reject or roll back the parent operation.

There is no automatic retry, isolated job queue or dispatcher timeout. Keep scripts short and bounded, make external work idempotent and verify final state when it matters. Current DNS coverage has a known unsupported add-action path; the DNS reference explains it.

Scope

These pages cover the five current generic hook-manager names found in installed call sites. Internal certificate-maintenance routines in letshook perform service/certificate work; their existence does not add a generic /var/eenos/hooks/ssl/ event. This reference does not register hooks, change services or promise callbacks for every panel or DNS operation.