Skip to content

Commit f068912

Browse files
authored
Add restart policies to frankenphp service (#2191)
interestingly Caddy doesn't have restart policies defined - we can't afford this as php may segfault --------- Signed-off-by: Marc <m@pyc.ac>
1 parent 86539ff commit f068912

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

package/alpine/frankenphp.openrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ command_background="yes"
1010
capabilities="^cap_net_bind_service"
1111
pidfile="/run/frankenphp/frankenphp.pid"
1212
start_stop_daemon_args="--chdir /var/lib/frankenphp"
13+
respawn_delay=3
14+
respawn_max=10
1315

1416
depend() {
1517
need net

package/debian/frankenphp.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ExecStartPre=/usr/bin/frankenphp validate --config /etc/frankenphp/Caddyfile
1212
ExecStart=/usr/bin/frankenphp run --environ --config /etc/frankenphp/Caddyfile
1313
ExecReload=/usr/bin/frankenphp reload --config /etc/frankenphp/Caddyfile
1414
WorkingDirectory=/var/lib/frankenphp
15+
Restart=on-failure
16+
RestartSec=3s
1517
TimeoutStopSec=5s
1618
LimitNOFILE=1048576
1719
LimitNPROC=512

package/rhel/frankenphp.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ExecStartPre=/usr/bin/frankenphp validate --config /etc/frankenphp/Caddyfile
1212
ExecStart=/usr/bin/frankenphp run --environ --config /etc/frankenphp/Caddyfile
1313
ExecReload=/usr/bin/frankenphp reload --config /etc/frankenphp/Caddyfile
1414
WorkingDirectory=/var/lib/frankenphp
15+
Restart=on-failure
16+
RestartSec=3s
1517
TimeoutStopSec=5s
1618
LimitNOFILE=1048576
1719
LimitNPROC=512

0 commit comments

Comments
 (0)