1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00
Peertube/support/init.d/peertube
q0ntinuum efdbd77d5d
Modernize the OpenRC service with openrc-run and improve production guide (#6983)
* Modernize the OpenRC service with openrc-run and add upgrade documentation

* Move some variables to conf.d
2025-04-16 07:00:50 +02:00

22 lines
589 B
Text

#!/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%/*}"
}