Skip to content
Snippets Groups Projects
Commit ec09f60b authored by anarcat's avatar anarcat Committed by anarcat
Browse files

prompt for the db user and password, pass that insecurely to the backend

parent bc578a2e
No related branches found
No related tags found
No related merge requests found
...@@ -16,4 +16,6 @@ fi ...@@ -16,4 +16,6 @@ fi
db_input low aegir/makefile || true db_input low aegir/makefile || true
db_input low aegir/email || true db_input low aegir/email || true
db_input low aegir/db_host || true db_input low aegir/db_host || true
db_input low aegir/db_user || true
db_input medium aegir/db_password || true
db_go db_go
...@@ -68,19 +68,26 @@ case "$1" in ...@@ -68,19 +68,26 @@ case "$1" in
fi fi
db_get "aegir/db_host" db_get "aegir/db_host"
AEGIR_DB_HOST="$RET" AEGIR_DB_HOST="$RET"
db_get "aegir/db_user"
AEGIR_DB_USER="$RET"
db_get "aegir/db_password"
AEGIR_DB_PASS="$RET"
db_get "aegir/email" db_get "aegir/email"
EMAIL="$RET" EMAIL="$RET"
db_get "aegir/makefile" db_get "aegir/makefile"
if [ ! -z "$RET" ]; then if [ ! -z "$RET" ]; then
MAKEFILE="--makefile='$RET'" MAKEFILE="--makefile='$RET'"
fi fi
db_reset aegir/db_password || true
db_fset aegir/db_password "seen" "false" || true
db_go
db_stop db_stop
if [ -d $VARLIB/.drush/provision ]; then if [ -d $VARLIB/.drush/provision ]; then
echo "existing provision in $VARLIB/.drush/provision detected, move away and try again" echo "existing provision in $VARLIB/.drush/provision detected, move away and try again"
exit 1 exit 1
fi fi
su aegir -c "drush hostmaster-install --aegir_db_host='$AEGIR_DB_HOST' --client_email='$EMAIL' $MAKEFILE $SITE" su aegir -c "drush hostmaster-install --aegir_db_host='$AEGIR_DB_HOST' --aegir_db_user='$AEGIR_DB_USER' --aegir_db_pass='$AEGIR_DB_PASS' --client_email='$EMAIL' $MAKEFILE $SITE"
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade|abort-remove|abort-deconfigure)
......
...@@ -13,6 +13,17 @@ Default: localhost ...@@ -13,6 +13,17 @@ Default: localhost
Description: Database server hostname: Description: Database server hostname:
This is the hostname at which the database server is available. This is the hostname at which the database server is available.
Template:aegir/db_user
Type: string
Default: root
Description: Database server user:
This should be a root MySQL user.
Template:aegir/db_password
Type: password
Description: Database server password:
The password for the root MySQL user.
Template:aegir/email Template:aegir/email
Type: string Type: string
Description: Main client email: Description: Main client email:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment