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

Remove app install from pending list before installing

parent 4b227f59
No related branches found
No related tags found
No related merge requests found
......@@ -945,15 +945,20 @@ function install_apps_from_webadmin {
rm "$webadmin_install_dir/app_qrcode_${app_name}.png"
fi
# remove from pending list so that if the install gets stuck
# it won't repeatedly try to install a bad app
sed -i "/$linestr/d" "$pending_installs"
if ! /usr/bin/timeout $APP_INSTALL_TIMEOUT_SEC /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"
else
# remove from pending list
sed -i "/$linestr/d" "$pending_installs"
fi
# remove the line
sed -i "/$linestr/d" "$pending_installs"
else
# if any unusual line is found then remove the file
rm "$pending_installs"
......
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