23 lines
736 B
Plaintext
23 lines
736 B
Plaintext
|
#!/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 $?
|
||
|
}
|