Title: apps/exec - JSON Config Structure
URL Source: https://caddyserver.com/docs/json/apps/exec/
Markdown Content:
{▾ "commands": [{▾ "command": "", "args": [""], "directory": "", "foreground": false, "timeout": "", "at": [""], "log": {•••}, "err_log": {•••} }]}
Non-standardThis module does not come with Caddy. It can be added by using xcaddy or our download page. Non-standard modules may be developed by the community and are not officially endorsed or maintained by the Caddy project. The documentation is shown here only as a courtesy.
Code repository: https://github.com/abiosoft/caddy-exec
Custom builds:xcaddy build --with github.com/abiosoft/caddy-exec
Description🔗
App is top level module that runs shell commands.
🔗commands Cmd is the module configuration
🔗commands/command The command to run.
🔗commands/args The command args.
🔗commands/directory The directory to run the command from. Defaults to current directory.
🔗commands/foreground If the command should run in the foreground. By default, commands run in the background and doesn't affect Caddy. Setting this makes the command run in the foreground. Note that failure of a startup command running in the foreground may prevent Caddy from starting.
🔗commands/timeout Timeout for the command. The command will be killed after timeout has elapsed if it is still running. Defaults to 10s.
🔗commands/at When the command should run. This can contain either of "startup" or "shutdown".
🔗commands/log Standard output log.
🔗commands/err_log Standard error log.