Files
archived-frankenphp/package/alpine/frankenphp.openrc
Marc f068912dee 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>
2026-02-16 14:45:49 +01:00

32 lines
734 B
Plaintext
Executable File

#!/sbin/openrc-run
name="FrankenPHP"
description="The modern PHP app server"
command="/usr/bin/frankenphp"
command_args="run --environ --config /etc/frankenphp/Caddyfile"
command_user="frankenphp:frankenphp"
command_background="yes"
capabilities="^cap_net_bind_service"
pidfile="/run/frankenphp/frankenphp.pid"
start_stop_daemon_args="--chdir /var/lib/frankenphp"
respawn_delay=3
respawn_max=10
depend() {
need net
after firewall
}
start_pre() {
checkpath --directory --owner frankenphp:frankenphp --mode 0755 /run/frankenphp
$command validate --config /etc/frankenphp/Caddyfile
}
reload() {
ebegin "Reloading $name configuration"
$command reload --config /etc/frankenphp/Caddyfile --force
eend $?
}