diff --git a/bin/convertdomain b/bin/convertdomain index 4ef009e..2062008 100755 --- a/bin/convertdomain +++ b/bin/convertdomain @@ -95,7 +95,7 @@ convert_plane() { docker exec postgresql psql -U plane -c "UPDATE instances SET domain='$DOMAIN_NEW' WHERE domain='$DOMAIN'" docker exec postgresql psql -U plane -c "UPDATE users SET email=REPLACE(email, '@$DOMAIN', '@$DOMAIN_NEW') WHERE email LIKE '%@$DOMAIN'" docker exec postgresql psql -U plane -c "UPDATE profiles SET company_name='$DOMAIN_NEW' WHERE company_name='$DOMAIN'" - start_service_convert "plane" "nc -z 192.168.0.50 80 &>/dev/null" + start_service_convert "plane" "nc -z 192.168.0.50 3000 &>/dev/null" echo done } convert_pdnsmysql() { @@ -139,7 +139,6 @@ convert_pdnsadmin() { # Start service with command to make sure it's up before proceeding start_service_convert "pdnsadmin" "nc -z ${SERVICE_IP} 9494 &> /dev/null" - MYSQL_ROOTPASSWORD=`cat /federated/apps/pdnsmysql/.env | grep MYSQL_ROOT_PASSWORD | awk -F= '{ print $2 }'` docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD pdns -e \"UPDATE user SET username=REPLACE(username, '@$DOMAIN', '@$DOMAIN_NEW') WHERE username LIKE '%@$DOMAIN';\"" docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD pdns -e \"UPDATE user SET email=REPLACE(email, '@$DOMAIN', '@$DOMAIN_NEW') WHERE email LIKE '%@$DOMAIN';\"" @@ -763,7 +762,6 @@ convert_castopod() { # Start service with command to make sure it's up before proceeding start_service_convert "castopod" "nc -z $SERVICE_IP 8000 &> /dev/null" - MYSQL_ROOTPASSWORD=`cat /federated/apps/pdnsmysql/.env | grep MYSQL_ROOT_PASSWORD | awk -F= '{ print $2 }'` docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD castopod -e \"UPDATE cp_auth_identities SET secret=REPLACE(secret, '@$DOMAIN', '@$DOMAIN_NEW) WHERE secret LIKE '%@$DOMAIN';\"" docker exec pdnsmysql bash -c "mysql -uroot -p$MYSQL_ROOTPASSWORD castopod -e \"UPDATE cp_users SET username=REPLACE(username, '@$DOMAIN', '@$DOMAIN_NEW') WHERE username LIKE '%@$DOMAIN';\"" @@ -1042,6 +1040,8 @@ DOMAIN_LDAP_DC="DC=${DOMAIN//./,DC=}" ADMINPASS=`cat /federated/bin/.adminpass | head -1` LDAP_SECRET=`cat /federated/apps/ldap/.ldap.secret` +MYSQL_ROOTPASSWORD=`cat /federated/apps/pdnsmysql/.env | grep MYSQL_ROOT_PASSWORD | awk -F= '{ print $2 }'` + # Set SMTP user based on if fcore exists [[ $(docker exec ldap slapcat | grep fcore) ]] && SMTPUSER="fcore" || SMTPUSER="admin"