Skip to main content

Hooks

Run any shell command after a successful service start or unsuccessful service exit.

Events

Configuration

Hooks inherit service environment variables.

Execution

  • Run via sh -c
  • Fire-and-forget (no retries)
  • Timeout kills with SIGKILL
  • Failures logged but don’t affect service

Behavior

Tips

  • Keep commands short
  • Use env vars for secrets
  • Make repeated actions idempotent