Skip to content
Snippets Groups Projects
Commit 36080779 authored by Bob Mottram's avatar Bob Mottram
Browse files

Use a file to indicate that the setup screen is active

parent a49fb30b
No related branches found
No related tags found
No related merge requests found
...@@ -118,6 +118,11 @@ do ...@@ -118,6 +118,11 @@ do
# remove the setup file created by setup.php # remove the setup file created by setup.php
rm "$setup_file" 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 # restart the web server
systemctl restart nginx systemctl restart nginx
fi fi
......
...@@ -459,6 +459,12 @@ function web_admin_setup_login { ...@@ -459,6 +459,12 @@ function web_admin_setup_login {
# if an nginx password file has not been created for web admin # if an nginx password file has not been created for web admin
if [ ! -f /etc/nginx/.webadminpasswd ]; then 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}")" webadmin_password="$(create_password "${MINIMUM_PASSWORD_LENGTH}")"
# create a password for users # create a password for users
...@@ -509,8 +515,10 @@ function install_web_admin { ...@@ -509,8 +515,10 @@ function install_web_admin {
if grep -q 'install_final' "$COMPLETION_FILE"; then if grep -q 'install_final' "$COMPLETION_FILE"; then
# initial installation has completed # initial installation has completed
if [ -f /etc/nginx/.webadminpasswd ]; then if [ -f /etc/nginx/.webadminpasswd ]; then
# a password was created if [ ! -f "$webadmin_install_dir/.setupscreenactive" ]; then
basic_auth_str='auth_basic' # a password was created
basic_auth_str='auth_basic'
fi
fi fi
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment