Files
SolTube/support/init.d/peertube
ShreejitPanchal 6601501eff Init commit
2026-05-19 19:56:02 +08:00

23 lines
589 B
Plaintext

#!/sbin/openrc-run
supervisor=supervise-daemon
name="PeerTube"
description="PeerTube self-hosted streaming service"
pidfile=/run/peertube/peertube.pid
output_log=/var/log/peertube/peertube.log
error_log="$output_log"
command_background=true
command_user="peertube:peertube"
command=/usr/bin/node
command_args="${directory}/dist/server"
required_dirs="$directory $NODE_CONFIG_DIR"
depend() {
after redis postgresql
}
start_pre() {
checkpath --directory --owner "$command_user" --mode 0750 "${pidfile%/*}"
checkpath --directory --owner "$command_user" --mode 0750 "${output_log%/*}"
}