mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
v-restart-proxy better restart handling
This commit is contained in:
parent
1c51af3b50
commit
04e3413590
1 changed files with 12 additions and 1 deletions
|
@ -52,7 +52,8 @@ fi
|
|||
# background restart
|
||||
if [ "$1" = 'background' ]; then
|
||||
# Restart system
|
||||
sleep 20
|
||||
sleep 300
|
||||
rm /tmp/restart-nginx
|
||||
service $PROXY_SYSTEM restart >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
send_email_report
|
||||
|
@ -67,6 +68,16 @@ if [ "$1" = 'background' ]; then
|
|||
exit;
|
||||
fi
|
||||
|
||||
if [ -f "/tmp/restart-nginx" ]; then
|
||||
exit;
|
||||
fi
|
||||
|
||||
service $PROXY_SYSTEM reload
|
||||
if [ $? -ne 0 ]; then
|
||||
send_email_report
|
||||
check_result $E_RESTART "$PROXY_SYSTEM reload failed"
|
||||
fi
|
||||
|
||||
touch /tmp/restart-nginx
|
||||
nohup $BIN/v-restart-proxy 'background' &>/dev/null &
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue