Skip to content

Commit

Permalink
fix data&time db bug
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Oct 31, 2013
1 parent d0f6d5d commit 1c0de53
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/v-add-database
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand All @@ -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"
Expand Down

0 comments on commit 1c0de53

Please sign in to comment.