]>
Commit | Line | Data |
---|---|---|
d29e239c GN |
1 | #!/bin/sh |
2 | ||
3 | # PROVIDE: peertube | |
4 | # REQUIRE: LOGIN postgresql nginx redis | |
5 | # KEYWORD: shutdown | |
6 | ||
7 | PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" | |
8 | ||
9 | . /etc/rc.subr | |
10 | ||
11 | desc="Peertube daemon" | |
12 | name=peertube | |
13 | rcvar=peertube_enable | |
14 | ||
15 | load_rc_config $name | |
16 | ||
17 | : ${peertube_enable:=NO} | |
18 | ||
7f3d712d | 19 | sig_stop=-KILL |
d29e239c GN |
20 | peertube_chdir="/var/www/peertube/peertube-latest" |
21 | peertube_env="HOME=/var/www/peertube \ | |
22 | NODE_ENV=production \ | |
23 | NODE_CONFIG_DIR=/var/www/peertube/config \ | |
24 | USER=peertube" | |
25 | peertube_user=peertube | |
26 | ||
7f3d712d GN |
27 | command="/usr/local/bin/node" |
28 | command_args="dist/server >> /var/log/peertube/${name}.log 2>&1 &" | |
d29e239c GN |
29 | |
30 | run_rc_command "$1" |