diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index 9baf50932..bd90ce560 100755 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -1,10 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash # Strict mode set -e # Backup database -SQL_BACKUP_PATH="/var/www/peertube/backup/sql-peertube_prod-$(date -Im).bak" +SQL_BACKUP_PATH="/var/www/peertube/backup/sql-peertube_prod-$(date +\"%Y%m%d-%H%M\").bak" mkdir -p /var/www/peertube/backup pg_dump -U peertube -W -h localhost -F c peertube_prod -f "$SQL_BACKUP_PATH" diff --git a/support/doc/production.md b/support/doc/production.md index db0c8d99f..5c21ab772 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -143,6 +143,22 @@ $ sudo systemctl start peertube $ sudo journalctl -feu peertube ``` +### FreeBSD + +Copy the startup script and update rc.conf: + +``` +$ sudo cp /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/ +$ sudo chmod +x /usr/local/etc/rc.d/peertube +$ sudo echo peertube_enable="YES" >> /etc/rc.conf +``` + +#### Run + +``` +$ sudo service peertube start +``` + ### Administrator The administrator password is automatically generated and can be found in the