aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorJocelyn Jaubert <jocelyn.jaubert@gmail.com>2018-05-21 22:10:13 +0200
committerChocobozzz <me@florianbigard.com>2018-05-22 08:08:40 +0200
commitb4e5942ca79b8f5702c80197ec40eab8fa053a24 (patch)
treed5eeb814cd16f2017515eb20376a52397301867b /scripts
parentee1219d83d4d3c6c59236c2e854e6b3ff36fa30f (diff)
downloadPeerTube-b4e5942ca79b8f5702c80197ec40eab8fa053a24.tar.gz
PeerTube-b4e5942ca79b8f5702c80197ec40eab8fa053a24.tar.zst
PeerTube-b4e5942ca79b8f5702c80197ec40eab8fa053a24.zip
Make it possible to change path used by upgrade.sh on command line
Diffstat (limited to 'scripts')
-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"