mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00

* Modernize the OpenRC service with openrc-run and add upgrade documentation * Move some variables to conf.d
22 lines
589 B
Text
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%/*}"
|
|
}
|