fix data&time db bug

This commit is contained in:
Serghey Rodin 2013-10-31 13:30:59 +02:00
commit 1c0de53944

View file

@ -69,9 +69,9 @@ esac
# Vesta #
#----------------------------------------------------------#
# Increasing counters
increase_dbhost_values
increase_user_value "$user" '$U_DATABASES'
# Update time and date
DATE=$(date +%F)
TIME=$(date +%T)
# Adding db to db conf
str="DB='$database' DBUSER='$dbuser' MD5='$md5' HOST='$host' TYPE='$type'"
@ -80,6 +80,10 @@ str="$str DATE='$DATE'"
echo "$str" >> $USER_DATA/db.conf
chmod 660 $USER_DATA/db.conf
# Increasing counters
increase_dbhost_values
increase_user_value "$user" '$U_DATABASES'
# Logging
log_history "added $type database $database"
log_event "$OK" "$EVENT"