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

Restart nginx on app install fail or cancel

parent 50915167
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,22 @@ fi
echo "Restored index screen" >> "$webadmin_install_dir/applog.txt";
fi
currently_installing_app_domain=/root/.fbone_currently_installing_app_domain
if [ -f "$currently_installing_app_domain" ]; then
app_domain=$(cat "$currently_installing_app_domain")
# if an nginx config was added for the app then remove it
# and restart the web server
if [ -f "/etc/nginx/sites-available/${app_domain}" ]; then
echo "Removing /etc/nginx/sites-available/${app_domain}" >> "$webadmin_install_dir/applog.txt"
nginx_dissite "${app_domain}"
rm "/etc/nginx/sites-available/${app_domain}"
echo "Restarting nginx" >> "$webadmin_install_dir/applog.txt"
systemctl restart nginx
fi
rm "$currently_installing_app_domain"
fi
exit 1
else
exit 0
......
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