aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/upgrade.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index abb7e9414..295e16bfd 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -2,7 +2,24 @@
2 2
3set -eu 3set -eu
4 4
5PEERTUBE_PATH=/var/www/peertube/ 5PEERTUBE_PATH=${1:-/var/www/peertube/}
6
7if [ ! -e "$PEERTUBE_PATH" ]; then
8 echo "Error - path \"$PEERTUBE_PATH\" wasn't found"
9 echo ""
10 echo "If peertube was installed in another path, you can specify it with"
11 echo " ./upgrade.sh <PATH>"
12 exit 1
13fi
14
15if [ ! -e "$PEERTUBE_PATH/versions" -o ! -e "$PEERTUBE_PATH/config/production.yaml" ]; then
16 echo "Error - Couldn't find peertube installation in \"$PEERTUBE_PATH\""
17 echo ""
18 echo "If peertube was installed in another path, you can specify it with"
19 echo " ./upgrade.sh <PATH>"
20 exit 1
21fi
22
6 23
7# Backup database 24# Backup database
8SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak" 25SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"