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

Install web admin after apps

parent ec8fb827
No related branches found
No related tags found
No related merge requests found
...@@ -358,6 +358,7 @@ setup_utils ...@@ -358,6 +358,7 @@ setup_utils
setup_email setup_email
setup_web setup_web
setup_apps "$command_options" setup_apps "$command_options"
install_web_admin
setup_final setup_final
echo '' echo ''
......
...@@ -93,7 +93,9 @@ do ...@@ -93,7 +93,9 @@ do
fi fi
# Do the initial setup which includes email # Do the initial setup which includes email
touch "$webadmin_install_dir/.running_install_command"
/usr/local/bin/freedombone -c "$CONFIGURATION_FILE" /usr/local/bin/freedombone -c "$CONFIGURATION_FILE"
rm "$webadmin_install_dir/.running_install_command"
fi fi
if grep -q 'install_final' "$COMPLETION_FILE"; then if grep -q 'install_final' "$COMPLETION_FILE"; then
...@@ -151,6 +153,10 @@ do ...@@ -151,6 +153,10 @@ do
rm -rf "$INSTALL_DIR/tempwebadmin" rm -rf "$INSTALL_DIR/tempwebadmin"
fi fi
if [ -f "$webadmin_install_dir/.running_install_command" ]; then
rm "$webadmin_install_dir/.running_install_command"
fi
# restart the web server # restart the web server
systemctl restart nginx systemctl restart nginx
fi fi
......
...@@ -1174,9 +1174,6 @@ function setup_web { ...@@ -1174,9 +1174,6 @@ function setup_web {
function_check install_web_server_access_control function_check install_web_server_access_control
install_web_server_access_control install_web_server_access_control
function_check install_web_admin
install_web_admin
} }
function upgrade_apps { function upgrade_apps {
......
...@@ -92,14 +92,16 @@ function web_admin_create_users { ...@@ -92,14 +92,16 @@ function web_admin_create_users {
users_file="$webadmin_install_dir/users.html" users_file="$webadmin_install_dir/users.html"
if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then
if [ -f "$users_file" ]; then if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then
rm "$users_file" if [ -f "$users_file" ]; then
fi rm "$users_file"
if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then fi
mkdir -p "$INSTALL_DIR/tempwebadmin" if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then
mkdir -p "$INSTALL_DIR/tempwebadmin"
fi
mv "$webadmin_install_dir/userprofile_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
mv "$webadmin_install_dir/userprofile_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
ADMIN_USER=$(get_completion_param "Admin user") ADMIN_USER=$(get_completion_param "Admin user")
...@@ -175,14 +177,16 @@ function web_admin_create_add_apps { ...@@ -175,14 +177,16 @@ function web_admin_create_add_apps {
appslist_add_filename="$webadmin_install_dir/apps_add.html" appslist_add_filename="$webadmin_install_dir/apps_add.html"
if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then
if [ -f "$appslist_add_filename" ]; then if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then
rm "$appslist_add_filename" if [ -f "$appslist_add_filename" ]; then
fi rm "$appslist_add_filename"
if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then fi
mkdir -p "$INSTALL_DIR/tempwebadmin" if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then
mkdir -p "$INSTALL_DIR/tempwebadmin"
fi
mv "$webadmin_install_dir/app_add_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
mv "$webadmin_install_dir/app_add_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
read_config_param DDNS_PROVIDER read_config_param DDNS_PROVIDER
...@@ -335,14 +339,16 @@ function web_admin_create_installed_apps { ...@@ -335,14 +339,16 @@ function web_admin_create_installed_apps {
appslist_filename="$webadmin_install_dir/apps.html" appslist_filename="$webadmin_install_dir/apps.html"
if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then
if [ -f "$appslist_filename" ]; then if [ ! -f "$webadmin_install_dir/.running_install_command" ]; then
rm "$appslist_filename" if [ -f "$appslist_filename" ]; then
fi rm "$appslist_filename"
if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then fi
mkdir -p "$INSTALL_DIR/tempwebadmin" if [ ! -d "$INSTALL_DIR/tempwebadmin" ]; then
mkdir -p "$INSTALL_DIR/tempwebadmin"
fi
mv "$webadmin_install_dir/app_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
mv "$webadmin_install_dir/app_"*.html "$INSTALL_DIR/tempwebadmin"
return
fi fi
appslist_template_filename="$webadmin_install_dir/apps_template.html" appslist_template_filename="$webadmin_install_dir/apps_template.html"
......
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