systemd: ensure unix socket is removed on ungraceful shutdown
Caddy chokes if it dies or systemd timeout kills the process ungracefully as it can't deal with a left over unix file socket. Ensure the unit always deletes the socket as a post exit cleanup strategy.
This commit is contained in:
@ -29,6 +29,7 @@ Environment=XDG_CONFIG_HOME=/etc
|
||||
ExecStartPre=/usr/bin/caddy validate --config /etc/caddy/Caddyfile
|
||||
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
||||
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
|
||||
ExecStopPost=/usr/bin/rm -f /run/caddy/admin.socket
|
||||
|
||||
# Do not allow the process to be restarted in a tight loop. If the
|
||||
# process fails to start, something critical needs to be fixed.
|
||||
|
Reference in New Issue
Block a user