Generation of smilodon admin password

This commit is contained in:
Bob Mottram 2017-11-23 20:58:27 +00:00
parent 437222650b
commit 944ca13f2c
1 changed files with 8 additions and 7 deletions

View File

@ -79,13 +79,6 @@ function change_password_smilodon {
}
function smilodon_create_database {
if [ -f $IMAGE_PASSWORD_FILE ]; then
SMILODON_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
else
if [ ! $SMILODON_ADMIN_PASSWORD ]; then
SMILODON_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
fi
fi
if [ ! $SMILODON_ADMIN_PASSWORD ]; then
return
fi
@ -297,6 +290,14 @@ function install_smilodon {
SMILODON_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)$(create_password 30)"
fi
if [ -f $IMAGE_PASSWORD_FILE ]; then
SMILODON_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
else
if [ ! $SMILODON_ADMIN_PASSWORD ]; then
SMILODON_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
fi
fi
export smilodon_domain_name=$SMILODON_ONION_HOSTNAME
export secret_key="$SMILODON_SECRET_KEY"
export mongodb_username='smilodon'