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

Don't show apps which are pending installation in web admin

parent 53ffb581
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,7 @@ function web_admin_create_add_apps {
local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
apps_add_template_filename="/var/www/${local_hostname}/htdocs/admin/apps_add_template.html"
appslist_add_filename="/var/www/${local_hostname}/htdocs/admin/apps_add.html"
pending_installs="/var/www/${local_hostname}/htdocs/admin/pending_installs.txt"
icons_dir="/var/www/${local_hostname}/htdocs/admin/icons"
app_add_template_filename="/var/www/${local_hostname}/htdocs/admin/app_add_template.html"
FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*"
......@@ -159,6 +160,13 @@ function web_admin_create_add_apps {
app_index=$((app_index+1))
done
# check if the app is pending installation
if [ -f "$pending_installs" ]; then
if grep -q "install_${app_name}" "$pending_installs"; then
app_is_installed=1
fi
fi
if [ ! $app_is_installed ]; then
app_filename="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-${app_name}"
if [ -f "$app_filename" ]; then
......
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