Submitted by yngens on Wed, 10/31/2018 - 07:46
We use the following code in post installation script to update client applications' passwords in case if the password was changed on Edit Virtual Server page (virtual-server/edit_domain.cgi):
if [ "$VIRTUALSERVER_ACTION" = "MODIFY_DOMAIN" ]; then
if [ $VIRTUALSERVER_PASS != $VIRTUALSERVER_OLDSERVER_PASS ]; then
custom_script_that_updates_client_applications_passwords_here
fi
fi
and it works like a charm.
However, if client decides to change password on Edit Databases > Passwords (virtual-server/list_databases.cgi) page instead, then unfortunately the following code fails:
if [ "$VIRTUALSERVER_ACTION" = "DBPASS_DOMAIN" ]; then
if [ $VIRTUALSERVER_PASS != $VIRTUALSERVER_OLDSERVER_PASS ]; then
custom_script_that_updates_client_applications_passwords_here
fi
fi
because both $VIRTUALSERVER_PASS and $VIRTUALSERVER_OLDSERVER_PASS are equal to the old password. I believe the variable $VIRTUALSERVER_PASS should contain the new custom password set and to me this is a bug.
Thanks for consideration to correct this.
Status:
Closed (works as designed)
Comments
Submitted by yngens on Wed, 10/31/2018 - 07:48 Comment #1
Submitted by andreychek on Wed, 10/31/2018 - 08:58 Comment #2
Submitted by JamieCameron on Fri, 11/02/2018 - 00:54 Comment #3
Try VIRTUALSERVER_MYSQL_PASS instead of VIRTUALSERVER_PASS. That's what will change if you just update the database password.
Submitted by yngens on Mon, 11/05/2018 - 09:01 Comment #4
Works like a charm, thanks!