diff --git a/src/freedombone b/src/freedombone index a737a061458d1c5670a627e4ec4beb332da6bb4b..f1eea0f9ad2372ec340448695191d57070fa8310 100755 --- a/src/freedombone +++ b/src/freedombone @@ -358,6 +358,7 @@ setup_utils setup_email setup_web setup_apps "$command_options" +install_web_admin setup_final echo '' diff --git a/src/freedombone-installer b/src/freedombone-installer index 057c11efc8c423a538180df9318f655867c87801..51b27f6133bde27ac1123a38bfaf5e6bf64c85db 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -93,7 +93,9 @@ do fi # Do the initial setup which includes email + touch "$webadmin_install_dir/.running_install_command" /usr/local/bin/freedombone -c "$CONFIGURATION_FILE" + rm "$webadmin_install_dir/.running_install_command" fi if grep -q 'install_final' "$COMPLETION_FILE"; then @@ -151,6 +153,10 @@ do rm -rf "$INSTALL_DIR/tempwebadmin" fi + if [ -f "$webadmin_install_dir/.running_install_command" ]; then + rm "$webadmin_install_dir/.running_install_command" + fi + # restart the web server systemctl restart nginx fi diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 9610c1654513b00e75f882a58365b6129130accb..63b671fa7b497b29dc3418877e17532c2f79e032 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -1174,9 +1174,6 @@ function setup_web { function_check install_web_server_access_control install_web_server_access_control - - function_check install_web_admin - install_web_admin } function upgrade_apps { diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index 31abcb9955262b97d85885d24f1d3826a33e99bf..75dc75908594c760523321a4e6f6bbf17b6291e0 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -92,14 +92,16 @@ function web_admin_create_users { users_file="$webadmin_install_dir/users.html" if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then - if [ -f "$users_file" ]; then - rm "$users_file" - fi - if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then - mkdir -p "$INSTALL_DIR/tempwebadmin" + if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then + if [ -f "$users_file" ]; then + rm "$users_file" + fi + if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then + mkdir -p "$INSTALL_DIR/tempwebadmin" + fi + mv "$webadmin_install_dir/userprofile_"*.html "$INSTALL_DIR/tempwebadmin" + return fi - mv "$webadmin_install_dir/userprofile_"*.html "$INSTALL_DIR/tempwebadmin" - return fi ADMIN_USER=$(get_completion_param "Admin user") @@ -175,14 +177,16 @@ function web_admin_create_add_apps { appslist_add_filename="$webadmin_install_dir/apps_add.html" if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then - if [ -f "$appslist_add_filename" ]; then - rm "$appslist_add_filename" - fi - if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then - mkdir -p "$INSTALL_DIR/tempwebadmin" + if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then + if [ -f "$appslist_add_filename" ]; then + rm "$appslist_add_filename" + fi + if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then + mkdir -p "$INSTALL_DIR/tempwebadmin" + fi + mv "$webadmin_install_dir/app_add_"*.html "$INSTALL_DIR/tempwebadmin" + return fi - mv "$webadmin_install_dir/app_add_"*.html "$INSTALL_DIR/tempwebadmin" - return fi read_config_param DDNS_PROVIDER @@ -335,14 +339,16 @@ function web_admin_create_installed_apps { appslist_filename="$webadmin_install_dir/apps.html" if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then - if [ -f "$appslist_filename" ]; then - rm "$appslist_filename" - fi - if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then - mkdir -p "$INSTALL_DIR/tempwebadmin" + if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then + if [ -f "$appslist_filename" ]; then + rm "$appslist_filename" + fi + if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then + mkdir -p "$INSTALL_DIR/tempwebadmin" + fi + mv "$webadmin_install_dir/app_"*.html "$INSTALL_DIR/tempwebadmin" + return fi - mv "$webadmin_install_dir/app_"*.html "$INSTALL_DIR/tempwebadmin" - return fi appslist_template_filename="$webadmin_install_dir/apps_template.html"