Update v-move-domain-and-database-to-account

This commit is contained in:
myvesta 2020-07-18 00:43:10 +02:00 committed by GitHub
commit aefa553351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@
# #
# The function of changing domain and database ownership. # The function of changing domain and database ownership.
#----------------------------------------------------------# #----------------------------------------------------------#
# Variable&Function # # Variable&Function #
#----------------------------------------------------------# #----------------------------------------------------------#
@ -19,7 +18,6 @@ source /etc/profile
# Includes # Includes
source /usr/local/vesta/func/main.sh source /usr/local/vesta/func/main.sh
#----------------------------------------------------------# #----------------------------------------------------------#
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
@ -42,6 +40,8 @@ USER_TO=$user
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
RET=$OK
echo "=================================" echo "================================="
r=$(/usr/local/vesta/bin/v-get-database-credentials-of-domain $domain) r=$(/usr/local/vesta/bin/v-get-database-credentials-of-domain $domain)
echo $r echo $r
@ -53,6 +53,7 @@ if [ ! -z "$DATABASE_NAME" ]; then
/usr/local/vesta/bin/v-change-database-owner $DATABASE_NAME $USER_TO /usr/local/vesta/bin/v-change-database-owner $DATABASE_NAME $USER_TO
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "=== v-change-database-owner failed" echo "=== v-change-database-owner failed"
RET=$E_NOTEXIST
fi fi
if [ ! -z "$DATABASE_USERNAME" ] && [ ! -z "$CONFIG_FILE_FULL_PATH" ]; then if [ ! -z "$DATABASE_USERNAME" ] && [ ! -z "$CONFIG_FILE_FULL_PATH" ]; then
@ -74,4 +75,13 @@ echo "=== v-change-domain-owner $domain $USER_TO"
/usr/local/vesta/bin/v-change-domain-owner $domain $USER_TO /usr/local/vesta/bin/v-change-domain-owner $domain $USER_TO
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "=== v-change-domain-owner failed" echo "=== v-change-domain-owner failed"
RET=$E_NOTEXIST
fi fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
log_event "$OK" "$ARGUMENTS"
exit