mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 09:02:11 +01:00
interestingly Caddy doesn't have restart policies defined - we can't afford this as php may segfault --------- Signed-off-by: Marc <m@pyc.ac>
32 lines
734 B
Plaintext
Executable File
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 $?
|
|
}
|