mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 13:16:45 +02:00
23 lines
No EOL
714 B
Bash
23 lines
No EOL
714 B
Bash
#!/sbin/openrc-run
|
|
|
|
supervisor=supervise-daemon
|
|
name=beszel
|
|
command="/usr/bin/beszel"
|
|
command_user="${BESZEL_USER:-beszel}"
|
|
command_args="serve --dir '${BESZEL_DATADIR:-/var/lib/beszel}' --http '${HOST:-127.0.0.1}:${PORT:-8090}'"
|
|
supervise_daemon_args="--chdir '${BESZEL_DATADIR:-/var/lib/beszel}' --stdout '${BESZEL_LOG_FILE:-/var/log/beszel/beszel.log}' --stderr '${BESZEL_LOG_FILE:-/var/log/beszel/beszel.log}'"
|
|
pidfile="/run/beszel.pid"
|
|
extra_started_commands="reopen_log"
|
|
capabilities="^cap_net_bind_service"
|
|
|
|
depend() {
|
|
use logger dns
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
reopen_log() {
|
|
ebegin "Reopening logfile for ${RC_SVCNAME}"
|
|
${supervisor} ${RC_SVCNAME} --signal USR1 --pidfile "${pidfile}"
|
|
eend $?
|
|
} |