Explorar o código

fix database restoration when database already exists

Serghey Rodin %!s(int64=13) %!d(string=hai) anos
pai
achega
e8a5188eff
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      bin/v-restore-user

+ 2 - 0
bin/v-restore-user

@@ -647,6 +647,8 @@ if [ "$db" != 'no' ]; then
             str="$str TYPE='$TYPE' CHARSET='$CHARSET' U_DISK='$U_DISK'"
             str="$str SUSPENDED='no' TIME='$(date +%T)' DATE='$(date +%F)'"
             echo $str >> $USER_DATA/db.conf
+        else
+            eval $(grep "DB='$db'" $USER_DATA/db.conf)
         fi
 
         echo -e "$(date "+%F %T") $DB"