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

Remove app from the removed list

parent 8be1bd20
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,9 @@ install_state=$INSTALL_STATE_FIRST_BOOT
CONFIGURATION_FILE="/root/${PROJECT_NAME}.cfg"
COMPLETION_FILE="/root/${PROJECT_NAME}-completed.txt"
# file containing a list of removed apps
REMOVED_APPS_FILE=/root/removed
# contains the blocked users and domains
FIREWALL_DOMAINS=/root/${PROJECT_NAME}-firewall-domains.cfg
......@@ -843,10 +846,16 @@ function install_apps_from_webadmin {
fi
fi
# remove app from the removed file
if ! grep -Fxq "_${app_name}_" "$REMOVED_APPS_FILE"; then
sed -i "/_${app_name}_/d" "$REMOVED_APPS_FILE"
fi
if ! /usr/local/bin/${PROJECT_NAME}-addremove add "${app_name}" > "$webadmin_install_dir/applog.txt"; then
sed -i "/$linestr/d" "$pending_installs"
web_admin_create_add_apps
fi
chown www-data:www-data "$webadmin_install_dir/applog.txt"
fi
# remove the line
......@@ -868,6 +877,7 @@ function remove_apps_from_webadmin {
if [[ "$linestr" != *'_running'* ]]; then
sed -i "s|${app_name}|${app_name}_running|g" "$pending_removes"
fi
/usr/local/bin/${PROJECT_NAME}-addremove remove "${app_name}" > "$webadmin_install_dir/applog.txt"
web_admin_create_add_apps
chown www-data:www-data "$webadmin_install_dir/applog.txt"
......
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