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

Don't generate pages for apps until initial setup has completed

parent 2ea76b80
No related branches found
No related tags found
No related merge requests found
......@@ -87,9 +87,18 @@ function web_admin_avahi {
}
function web_admin_create_users {
ADMIN_USER=$(get_completion_param "Admin user")
web_admin_get_hostname
users_file="$webadmin_install_dir/users.html"
if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then
if [ -f "$users_file" ]; then
rm "$users_file"
fi
return
fi
ADMIN_USER=$(get_completion_param "Admin user")
cp "$webadmin_install_dir/users_template.html" "$users_file"
sed -i '/users list/,/end of users/d' "$users_file"
sed -i '/<\/body>/d' "$users_file"
......@@ -158,10 +167,18 @@ function web_admin_create_users {
}
function web_admin_create_add_apps {
read_config_param DDNS_PROVIDER
web_admin_get_hostname
apps_add_template_filename="$webadmin_install_dir/apps_add_template.html"
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
return
fi
read_config_param DDNS_PROVIDER
apps_add_template_filename="$webadmin_install_dir/apps_add_template.html"
pending_installs="$webadmin_install_dir/pending_installs.txt"
icons_dir="$webadmin_install_dir/icons"
app_add_template_filename="$webadmin_install_dir/app_add_template.html"
......@@ -307,9 +324,17 @@ function web_admin_create_add_apps {
function web_admin_create_installed_apps {
web_admin_get_hostname
appslist_filename="$webadmin_install_dir/apps.html"
if [ -f "$webadmin_install_dir/.setupscreenactive" ]; then
if [ -f "$appslist_filename" ]; then
rm "$appslist_filename"
fi
return
fi
appslist_template_filename="$webadmin_install_dir/apps_template.html"
app_template_filename="$webadmin_install_dir/app_template.html"
appslist_filename="$webadmin_install_dir/apps.html"
icons_dir="$webadmin_install_dir/icons"
pending_removes="$webadmin_install_dir/pending_removes.txt"
......@@ -551,6 +576,7 @@ function install_web_admin {
web_admin_installed=
if [ -d "/usr/share/${PROJECT_NAME}/webadmin" ]; then
if [ -d "/usr/share/${PROJECT_NAME}/webadmin/${language_subdir}" ]; then
rm "$webadmin_install_dir/*.html"
cp -r "/usr/share/${PROJECT_NAME}/webadmin"/* "$webadmin_install_dir"
cp "/usr/share/${PROJECT_NAME}/webadmin/${language_subdir}"/*.html "$webadmin_install_dir"
......
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