mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
update error treatment for nginx not restart after running deploy script to oft in short amount of time
This commit is contained in:
parent
58d0e7f160
commit
1d19ff784b
@ -173,7 +173,14 @@ onError() {
|
||||
log_error "( x.x ) Exit Code: $exit_code"
|
||||
log_error " > < Offending command: '$BASH_COMMAND'"
|
||||
log_error ""
|
||||
exit 1
|
||||
if [ '$BASH_COMMAND' == 'sudo /etc/init.d/nginx restart' ]; then
|
||||
log_warn "nginx restart failed, this can occur if updating to often in short time span"
|
||||
log_warn "will try to fix with 'sudo systemctl reset-failed nginx' and 'sudo systemctl start nginx'"
|
||||
sudo systemctl reset-failed nginx
|
||||
sudo systemctl start nginx
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
trap onError ERR
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user