diff --git a/src/freedombone-installer b/src/freedombone-installer index e3d3d3c43c1738daa2b498edaa7edcb1ca032465..4d922223bb1d88e7aa6d50bc39764dfa3137e673 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -118,6 +118,11 @@ do # remove the setup file created by setup.php rm "$setup_file" + # remove the file which indicates that the setup screen is active + if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then + rm "$webadmin_install_dir/.setupscreenactive" + fi + # restart the web server systemctl restart nginx fi diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index 6eb4608194d331e4f95e783e33198af1e35981a0..628b154c0280169c37caa7abc2170118fdd15d98 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -459,6 +459,12 @@ function web_admin_setup_login { # if an nginx password file has not been created for web admin if [ ! -f /etc/nginx/.webadminpasswd ]; then + # this file indicates that the setup screen is active + # and gets removed by freedombone-installer + if [ ! -f "$webadmin_install_dir/.setupscreenactive" ]; then + touch "$webadmin_install_dir/.setupscreenactive" + fi + webadmin_password="$(create_password "${MINIMUM_PASSWORD_LENGTH}")" # create a password for users @@ -509,8 +515,10 @@ function install_web_admin { if grep -q 'install_final' "$COMPLETION_FILE"; then # initial installation has completed if [ -f /etc/nginx/.webadminpasswd ]; then - # a password was created - basic_auth_str='auth_basic' + if [ ! -f "$webadmin_install_dir/.setupscreenactive" ]; then + # a password was created + basic_auth_str='auth_basic' + fi fi fi