2018-03-19 17:19:39 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# PROVIDE: peertube
|
|
|
|
# REQUIRE: LOGIN postgresql nginx redis
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
desc="Peertube daemon"
|
|
|
|
name=peertube
|
|
|
|
rcvar=peertube_enable
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
: ${peertube_enable:=NO}
|
|
|
|
|
2018-12-10 10:51:28 +01:00
|
|
|
sig_stop=HUP
|
2018-03-19 17:19:39 +01:00
|
|
|
peertube_chdir="/var/www/peertube/peertube-latest"
|
|
|
|
peertube_env="HOME=/var/www/peertube \
|
|
|
|
NODE_ENV=production \
|
|
|
|
NODE_CONFIG_DIR=/var/www/peertube/config \
|
|
|
|
USER=peertube"
|
|
|
|
peertube_user=peertube
|
2018-12-10 10:51:28 +01:00
|
|
|
procname="node:"
|
2018-03-19 17:19:39 +01:00
|
|
|
|
|
|
|
command="/usr/local/bin/npm"
|
|
|
|
command_args="start >> /var/log/peertube/${name}.log 2>&1 &"
|
|
|
|
|
|
|
|
run_rc_command "$1"
|