summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaften2018-05-31 18:11:41 (GMT)
committerHerman van Rink2018-05-31 18:11:41 (GMT)
commitf8b88dc708405a6a8c3db6bbb5f08697bdd3418b (patch)
treef70161f1cd7af664bf8f3a47e89e011b00ca2ccd
parent7bf972c539d1ccbec79e8faa727a123553ad7cd8 (diff)
Issue #2976164 by daften: Installation with a remote db server fails
-rw-r--r--debian/aegir3-hostmaster.postinst4
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/aegir3-hostmaster.postinst b/debian/aegir3-hostmaster.postinst
index 1964e95..fad6748 100644
--- a/debian/aegir3-hostmaster.postinst
+++ b/debian/aegir3-hostmaster.postinst
@@ -121,7 +121,7 @@ case "$1" in
# Determin if we create a db accoount or ask for it.
# Starting from MariaDB 10.1... https://www.drupal.org/node/2770819
# TODO: Work with future versions
- if mysql --database=mysql --execute="show tables;" > /dev/null 2>&1
+ if mysql --host=$AEGIR_DB_HOST --database=mysql --execute="show tables;" > /dev/null 2>&1
then
# MariaDB = 10.1
CREATEUSER=1
@@ -160,7 +160,7 @@ case "$1" in
# Random password, will be stored in /var/aegir/.drush/server_localhost.alias.drushrc.php
AEGIR_DB_PASS=$(openssl rand -base64 12)
- /usr/bin/mysql -e "GRANT ALL ON *.* TO '$AEGIR_DB_USER'@'localhost' IDENTIFIED BY '$AEGIR_DB_PASS' WITH GRANT OPTION"
+ /usr/bin/mysql -e "GRANT ALL ON *.* TO '$AEGIR_DB_USER'@'$AEGIR_DB_HOST' IDENTIFIED BY '$AEGIR_DB_PASS' WITH GRANT OPTION"
fi
if [ -d $AEGIRHOME/.drush/provision ]; then