mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Fix for: /usr/local/vesta/func/db.sh: line 390: [: : integer expression expected
Every night cron is sending email with subject: Cron <admin@host> sudo /usr/local/vesta/bin/v-update-sys-queue disk And content of that email is: /usr/local/vesta/func/db.sh: line 390: [: : integer expression expected This is a fix for that bug. I guess mysql for some databases returns empty string for DB size, so this will handle that case.
This commit is contained in:
parent
e6d6e19032
commit
5d6c0137c1
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue