Skip to content

Commit 1c0de53

Browse files
committed
fix data&time db bug
1 parent d0f6d5d commit 1c0de53

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bin/v-add-database

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ esac
6969
# Vesta #
7070
#----------------------------------------------------------#
7171

72-
# Increasing counters
73-
increase_dbhost_values
74-
increase_user_value "$user" '$U_DATABASES'
72+
# Update time and date
73+
DATE=$(date +%F)
74+
TIME=$(date +%T)
7575

7676
# Adding db to db conf
7777
str="DB='$database' DBUSER='$dbuser' MD5='$md5' HOST='$host' TYPE='$type'"
@@ -80,6 +80,10 @@ str="$str DATE='$DATE'"
8080
echo "$str" >> $USER_DATA/db.conf
8181
chmod 660 $USER_DATA/db.conf
8282

83+
# Increasing counters
84+
increase_dbhost_values
85+
increase_user_value "$user" '$U_DATABASES'
86+
8387
# Logging
8488
log_history "added $type database $database"
8589
log_event "$OK" "$EVENT"

0 commit comments

Comments
 (0)