Skip to content

Commit

Permalink
Merge branch 'develop' into 'develop'
Browse files Browse the repository at this point in the history
Add FreeBSD rc script

See merge request chocobozzz/PeerTube!4
  • Loading branch information
Chocobozzz committed Mar 19, 2018
2 parents 632c5e3 + d29e239 commit c1dd9b0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions support/freebsd/peertube
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/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}

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

command="/usr/local/bin/npm"
command_args="start >> /var/log/peertube/${name}.log 2>&1 &"

run_rc_command "$1"

0 comments on commit c1dd9b0

Please sign in to comment.