mirror of https://github.com/Chocobozzz/PeerTube
Check if awk and sed are executable
parent
7593929170
commit
5c94c38d18
|
@ -20,13 +20,15 @@ if [ ! -e "$PEERTUBE_PATH/versions" -o ! -e "$PEERTUBE_PATH/config/production.ya
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REMAINING=$(df -k $PEERTUBE_PATH | awk '{ print $4}' | sed -n 2p)
|
if [ -x "$(command -v awk)" ] && [ -x "$(command -v sed)" ] ; then
|
||||||
ONE_GB=$((1024 * 1024))
|
REMAINING=$(df -k $PEERTUBE_PATH | awk '{ print $4}' | sed -n 2p)
|
||||||
if [ "$REMAINING" -lt "$ONE_GB" ]; then
|
ONE_GB=$((1024 * 1024))
|
||||||
echo "Error - not enough free space for upgrading"
|
if [ "$REMAINING" -lt "$ONE_GB" ]; then
|
||||||
echo ""
|
echo "Error - not enough free space for upgrading"
|
||||||
echo "Make sure you have at least 1 GB of free space in $PEERTUBE_PATH"
|
echo ""
|
||||||
exit 1
|
echo "Make sure you have at least 1 GB of free space in $PEERTUBE_PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Backup database
|
# Backup database
|
||||||
|
|
Loading…
Reference in New Issue