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

Move nginx config on cancel or fail of app install

parent 3e11ff32
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,8 @@ fi
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}"
mv "/etc/nginx/sites-available/${app_domain}" /root/.nginx_config
cat /root/.nginx_config >> "$webadmin_install_dir/applog.txt"
echo "Restarting nginx" >> "$webadmin_install_dir/applog.txt"
systemctl restart nginx
fi
......@@ -97,6 +98,10 @@ fi
fi
)
if [ -f /root/.nginx_config ]; then
rm /root/.nginx_config
fi
if [ -f "$adding_app_file" ]; then
rm "$adding_app_file"
fi
......
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