diff --git a/src/freedombone-app-smilodon b/src/freedombone-app-smilodon index 155b17e8..b0f9bc5e 100755 --- a/src/freedombone-app-smilodon +++ b/src/freedombone-app-smilodon @@ -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'