From 1c0de53944d22ac9dfbad6c7af32e9f3615dce60 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 31 Oct 2013 13:30:59 +0200 Subject: [PATCH] fix data&time db bug --- bin/v-add-database | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/v-add-database b/bin/v-add-database index 18c783d8..b1887abb 100755 --- a/bin/v-add-database +++ b/bin/v-add-database @@ -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"