From d29e239cc4cbd5f5a6840731220f6bf3efe1b5ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9rald=20Niel?= Date: Mon, 19 Mar 2018 17:19:39 +0100 Subject: [PATCH] Add FreeBSD rc script --- support/freebsd/peertube | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 support/freebsd/peertube 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 @@ +#!/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" -- 2.25.1