projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6ff697
)
Check free storage before upgrading
author
Felix Ableitner
<me@nutomic.com>
Thu, 22 Nov 2018 14:40:49 +0000
(15:40 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 4 Dec 2018 08:31:36 +0000
(09:31 +0100)
scripts/upgrade.sh
patch
|
blob
|
history
diff --git
a/scripts/upgrade.sh
b/scripts/upgrade.sh
index c70b3b42a8bdc608b1c3ea3961462de10135561a..0a9ce1dabc81fc5c5af6a30cfa306f1c2d9213cd 100755
(executable)
--- a/
scripts/upgrade.sh
+++ b/
scripts/upgrade.sh
@@
-20,6
+20,14
@@
if [ ! -e "$PEERTUBE_PATH/versions" -o ! -e "$PEERTUBE_PATH/config/production.ya
exit 1
fi
+REMAINING=$(df -k $PEERTUBE_PATH | awk '{ print $4}' | sed -n 2p)
+ONE_GB=$((1024 * 1024))
+if [ "$REMAINING" -lt "$ONE_GB" ]; then
+ echo "Error - not enough free space for upgrading"
+ echo ""
+ echo "Make sure you have at least 1 GB of free space in $PEERTUBE_PATH"
+ exit 1
+fi
# Backup database
SQL_BACKUP_PATH="$PEERTUBE_PATH/backup/sql-peertube_prod-$(date +"%Y%m%d-%H%M").bak"