diff --git a/bin/v_upd_db_base_disk b/bin/v_upd_db_base_disk index 466b12d83..faeabc419 100755 --- a/bin/v_upd_db_base_disk +++ b/bin/v_upd_db_base_disk @@ -49,10 +49,15 @@ type=$(get_db_value '$TYPE') # Switching on db type case $type in - mysql) disk_usage=$(get_disk_db_mysql) ;; - pgsql) disk_usage=$(get_disk_db_pgsql) ;; + mysql) disk_usage=$(get_disk_db_mysql); ret_val="$?" ;; + pgsql) disk_usage=$(get_disk_db_pgsql); ret_val="$?" ;; esac +# Checking ret_val +if [ "$ret_val" -ne '0' ]; then + exit $ret_val +fi + #----------------------------------------------------------# # Vesta # diff --git a/bin/v_upd_db_bases_disk b/bin/v_upd_db_bases_disk index 6cda01ecd..207afea38 100755 --- a/bin/v_upd_db_bases_disk +++ b/bin/v_upd_db_bases_disk @@ -55,12 +55,14 @@ for database in $databases; do # Switching on db type case $type in - mysql) disk_usage=$(get_disk_db_mysql) ;; - pgsql) disk_usage=$(get_disk_db_pgsql) ;; + mysql) disk_usage=$(get_disk_db_mysql); ret_val="$?" ;; + pgsql) disk_usage=$(get_disk_db_pgsql); ret_val="$?" ;; esac # Updating disk value in config - update_db_base_value '$U_DISK' "$disk_usage" + if [ "$ret_val" -eq '0' ]; then + update_db_base_value '$U_DISK' "$disk_usage" + fi done