From 8b84dc19a9d9af57ef3eae51d92ebeeae6320b68 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 18 Nov 2016 23:59:57 +0000 Subject: [PATCH] Use image password --- src/freedombone-app-etherpad | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/freedombone-app-etherpad b/src/freedombone-app-etherpad index 675ad761..37c21490 100755 --- a/src/freedombone-app-etherpad +++ b/src/freedombone-app-etherpad @@ -58,10 +58,10 @@ function change_password_etherpad { } function etherpad_create_database { - if [ ! $ETHERPAD_ADMIN_PASSWORD ]; then - if [ -f $IMAGE_PASSWORD_FILE ]; then - ETHERPAD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" - else + if [ -f $IMAGE_PASSWORD_FILE ]; then + ETHERPAD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" + else + if [ ! $ETHERPAD_ADMIN_PASSWORD ]; then ETHERPAD_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" fi fi @@ -435,10 +435,10 @@ function install_etherpad { exit 7359 fi - if [ ! $ETHERPAD_ADMIN_PASSWORD ]; then - if [ -f $IMAGE_PASSWORD_FILE ]; then - ETHERPAD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" - else + if [ -f $IMAGE_PASSWORD_FILE ]; then + ETHERPAD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" + else + if [ ! $ETHERPAD_ADMIN_PASSWORD ]; then ETHERPAD_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" fi fi