Merge pull request #779 from dpeca/patch-7

Fix for: /usr/local/vesta/func/db.sh: line 390: [: : integer expressi…
This commit is contained in:
Serghey Rodin 2016-08-29 18:07:37 +03:00 committed by GitHub
commit ec9518f663

View file

@ -387,7 +387,7 @@ get_mysql_disk_usage() {
query="SELECT SUM( data_length + index_length ) / 1024 / 1024 \"Size\"
FROM information_schema.TABLES WHERE table_schema='$database'"
usage=$(mysql_query "$query" |tail -n1)
if [ "$usage" == 'NULL' ] || [ "${usage:0:1}" -eq '0' ]; then
if [ "$usage" == '' ] || [ "$usage" == 'NULL' ] || [ "${usage:0:1}" -eq '0' ]; then
usage=1
fi
export LC_ALL=C