diff options
author | Gérald Niel <gerald.niel@gegeweb.org> | 2018-03-19 17:19:39 +0100 |
---|---|---|
committer | Gérald Niel <gerald.niel@gegeweb.org> | 2018-03-19 17:19:39 +0100 |
commit | d29e239cc4cbd5f5a6840731220f6bf3efe1b5ea (patch) | |
tree | 23d4218998006d0ac0d5dd4b9bd6cb787b8d7d7a /support/freebsd | |
parent | 6194c1b41902e1d4907d192df80d454ae580884b (diff) | |
download | PeerTube-d29e239cc4cbd5f5a6840731220f6bf3efe1b5ea.tar.gz PeerTube-d29e239cc4cbd5f5a6840731220f6bf3efe1b5ea.tar.zst PeerTube-d29e239cc4cbd5f5a6840731220f6bf3efe1b5ea.zip |
Add FreeBSD rc script
Diffstat (limited to 'support/freebsd')
-rwxr-xr-x | support/freebsd/peertube | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/support/freebsd/peertube b/support/freebsd/peertube new file mode 100755 index 000000000..78fdf5848 --- /dev/null +++ b/support/freebsd/peertube | |||
@@ -0,0 +1,29 @@ | |||
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 | |||
19 | peertube_chdir="/var/www/peertube/peertube-latest" | ||
20 | peertube_env="HOME=/var/www/peertube \ | ||
21 | NODE_ENV=production \ | ||
22 | NODE_CONFIG_DIR=/var/www/peertube/config \ | ||
23 | USER=peertube" | ||
24 | peertube_user=peertube | ||
25 | |||
26 | command="/usr/local/bin/npm" | ||
27 | command_args="start >> /var/log/peertube/${name}.log 2>&1 &" | ||
28 | |||
29 | run_rc_command "$1" | ||