aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/upgrade.sh
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-06 12:26:58 +0100
committerChocobozzz <me@florianbigard.com>2019-02-06 12:26:58 +0100
commit73471b1a52f242e86364ffb077ea6cadb3b07ae2 (patch)
tree43dbb7748e281f8d80f15326f489cdea10ec857d /scripts/upgrade.sh
parentc22419dd265c0c7185bf4197a1cb286eb3d8ebc0 (diff)
parentf5305c04aae14467d6f957b713c5a902275cbb89 (diff)
downloadPeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.tar.gz
PeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.tar.zst
PeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.zip
Merge branch 'release/v1.2.0'
Diffstat (limited to 'scripts/upgrade.sh')
-rwxr-xr-xscripts/upgrade.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index c70b3b42a..4f7c58edd 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -20,6 +20,16 @@ if [ ! -e "$PEERTUBE_PATH/versions" -o ! -e "$PEERTUBE_PATH/config/production.ya
20 exit 1 20 exit 1
21fi 21fi
22 22
23if [ -x "$(command -v awk)" ] && [ -x "$(command -v sed)" ] ; then
24 REMAINING=$(df -k $PEERTUBE_PATH | awk '{ print $4}' | sed -n 2p)
25 ONE_GB=$((1024 * 1024))
26 if [ "$REMAINING" -lt "$ONE_GB" ]; then
27 echo "Error - not enough free space for upgrading"
28 echo ""
29 echo "Make sure you have at least 1 GB of free space in $PEERTUBE_PATH"
30 exit 1
31 fi
32fi
23 33
24# Backup database 34# Backup database
25SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak" 35SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"