Account Suspension Hooks
Handle Eenos suspendacct UPDATE hooks, account payloads and suspension timing without treating post as a success guarantee.
| Property | Value |
|---|---|
| Function/directory | suspendacct |
| Pre scripts | /var/eenos/hooks/suspendacct/pre/ |
| Post scripts | /var/eenos/hooks/suspendacct/post/ |
| Delivered actions | UPDATE |
| Panel label | wap |
The shared suspension routine emits suspendacct hooks with panel=wap and action=UPDATE. The event name identifies suspension; action is not SUSPEND. Bulk/reseller suspension can invoke the underlying account routine for individual accounts, so make integration handling repeatable.
Payload and timing
data is the loaded hosting-user mapping. The separate domain/user arguments identify the target. The suspension reason and timestamp are written to the suspension record separately; the hook payload does not automatically include those fields merely because the suspension operation has them.
The pre-hook runs before the suspension-record write and account-lock/home/vhost operations, although the suspended-record directory may already have been created. The post-hook is placed after the write/operation branches and can run when those branches report failure. It does not include a result or success argument.
Verify resulting state
Do not mark an external customer permanently suspended solely because this post-hook ran. Check the resulting account/suspension state using an authorized workflow and reconcile partial failures. A pre-hook exit status cannot cancel suspension. Keep notifications bounded and avoid re-entering the same suspension workflow from its hook.
Script contract
Each script receives command-line key=value arguments: base64-encoded JSON data, uppercase action, lowercase panel and optional domain/user. Use the argument decoder examples and installation guide. Scripts run in lexicographic filename order within each phase. There is no automatic retry, hook-specific timeout or parent-operation veto from a nonzero exit code.