Skip to content

Commit

Permalink
systemd restart caddy service on unexpected shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Dec 2, 2024
1 parent c1013be commit 0c60ce0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions files/caddy.service
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE

# Auto restart in case of unexpected shutdown (e.g. when killed due to OOM-condition)
RestartPreventExitStatus=1
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

0 comments on commit 0c60ce0

Please sign in to comment.