fix: restart nginx if ESPConnect update fails
This commit is contained in:
@@ -35,7 +35,11 @@ function update_script() {
|
|||||||
systemctl stop nginx
|
systemctl stop nginx
|
||||||
msg_ok "Stopped Nginx"
|
msg_ok "Stopped Nginx"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"
|
if ! CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"; then
|
||||||
|
msg_error "Failed to update ${APP}; restarting Nginx"
|
||||||
|
systemctl start nginx
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Starting Nginx"
|
msg_info "Starting Nginx"
|
||||||
systemctl start nginx
|
systemctl start nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user