diff --git a/src/freedombone-installer b/src/freedombone-installer index 96e1d060dd4f23ade9606a3f4db24b3e7430b25a..cbdd3c799cb0990670958fb693e9e533d8288f57 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -128,7 +128,7 @@ do fi # set permissions for web admin site at freedombone.local - chown www-data:www-data "$webadmin_install_dir/index.html" + chown www-data:www-data "$webadmin_install_dir/*.html" # remove the setup file created by setup.php rm "$setup_file" diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index 7f0819b7eda0e5f0d05ef16a6d7d7ab346aa890b..113f55d07769f1cab51ffc5947fe77e5160c4078 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -538,7 +538,6 @@ function web_admin_setup_login { # create a setup page with the initial password inserted # and copy it to the index - cp "$webadmin_install_dir"/index.html "$webadmin_install_dir"/index.prev cp "$webadmin_install_dir"/setup.html "$webadmin_install_dir"/setup.prev cp "$webadmin_install_dir"/setup_confirm_template.html "$webadmin_install_dir"/setup_confirm.html sed -i "s|WEBADMINPASSWORD|${webadmin_password}|g" "$webadmin_install_dir/setup.prev" @@ -584,9 +583,13 @@ function install_web_admin { cp -r "/usr/share/${PROJECT_NAME}/webadmin"/* "$webadmin_install_dir" cp "/usr/share/${PROJECT_NAME}/webadmin/${language_subdir}"/*.html "$webadmin_install_dir" - if [ -f "$webadmin_install_dir/setup.prev" ]; then - # We are still waiting for initial setup to happen - cp "$webadmin_install_dir"/setup.prev "$webadmin_install_dir"/index.html + cp "$webadmin_install_dir"/index.html "$webadmin_install_dir"/index.prev + + if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then + if [ -f "$webadmin_install_dir/setup.prev" ]; then + # We are still waiting for initial setup to happen + cp "$webadmin_install_dir"/setup.prev "$webadmin_install_dir"/index.html + fi fi # if this is an onion only install then modify some php scripts