Caddy install, config generation, reload, and management commands.
Summary
Functions
Check if Caddy is installed.
Replace /etc/caddy/Caddyfile with an import directive so Caddy picks up service Caddyfiles on reboot.
Install Caddy via apt on Debian/Ubuntu.
Get Caddy proxy logs via journalctl. Options: lines (default 100), since, grep, follow.
Read the active port from the active_port file.
Reload Caddy configuration (graceful - drains existing connections).
Start Caddy with the service Caddyfile.
Check Caddy status.
Stop Caddy.
Write the active port to the active_port file.
Write a Caddyfile to the service directory.
Write a maintenance mode Caddyfile.
Functions
Check if Caddy is installed.
Replace /etc/caddy/Caddyfile with an import directive so Caddy picks up service Caddyfiles on reboot.
Install Caddy via apt on Debian/Ubuntu.
Get Caddy proxy logs via journalctl. Options: lines (default 100), since, grep, follow.
Read the active port from the active_port file.
Reload Caddy configuration (graceful - drains existing connections).
Start Caddy with the service Caddyfile.
Check Caddy status.
Stop Caddy.
Write the active port to the active_port file.
Write a Caddyfile to the service directory.
Write a maintenance mode Caddyfile.