#!/sbin/openrc-run name="uptime-kuma" description="A free and open source uptime monitoring solution" : ${DATA_DIR:=/var/lib/$name/} export DATA_DIR UPTIME_KUMA_HOST UPTIME_KUMA_PORT UPTIME_KUMA_SSL_KEY \ UPTIME_KUMA_SSL_CERT \ UPTIME_KUMA_CLOUDFLARED_TOKEN \ UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN NODE_EXTRA_CA_CERTS \ NODE_TLS_REJECT_UNAUTHORIZED NODE_OPTIONS directory="/usr/share/$RC_SVCNAME" : ${pidfile:="/run/$RC_SVCNAME.pid"} command="/usr/bin/node" command_args="server/server.js $command_args" : ${command_user:="$RC_SVCNAME:$RC_SVCNAME"} command_background="yes" output_log="/var/log/$RC_SVCNAME.log" error_log="$output_log" start_pre() { checkpath --file --owner "$name:$name" -m 755 "$output_log" checkpath --directory --owner "$name:$name" -m 750 "$DATA_DIR" } depends() { need net } # vim:sts=4:sw=4:et