diff --git a/support/doc/production.md b/support/doc/production.md index 4f20cf140f39ae1f699ba166765a03eb2d0357f2..f770b58f6aea414fa33b2499983d9379798d1328 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -195,6 +195,27 @@ Run: $ sudo service peertube start ``` +### OpenRC + +If your OS uses OpenRC, copy the service script: + +``` +$ sudo cp /var/www/peertube/peertube-latest/support/init.d/peertube /etc/init.d/ +``` + +If you want to start PeerTube on boot: + +``` +$ sudo rc-update add peertube default +``` + +Run and print last logs: + +``` +$ sudo /etc/init.d/peertube start +$ tail -f /var/log/peertube/peertube.log +``` + ### Administrator The administrator password is automatically generated and can be found in the diff --git a/support/init.d/peertube b/support/init.d/peertube index 4473fc0eaf02d38155d2a5dde3db31a15e86d753..bb51b2e9951398f41e4e46d8902ca993e874f2cc 100644 --- a/support/init.d/peertube +++ b/support/init.d/peertube @@ -4,10 +4,10 @@ APP_NAME="peertube" USER="peertube" GROUP="peertube" NODE_ENV="production" -APP_DIR="/var/www/peertube" +APP_DIR="/var/www/peertube/peertube-latest" NODE_APP="dist/server" KWARGS="" -CONFIG_DIR="/etc/peertube" +CONFIG_DIR="/var/www/peertube/config" PID_DIR="$APP_DIR/pid" PID_FILE="$PID_DIR/$APP_NAME.pid" LOG_DIR="/var/log/peertube"