File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,26 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
4949 exit
5050fi
5151
52- # Restart system
53- service $PROXY_SYSTEM reload > /dev/null 2>&1
54- if [ $? -ne 0 ]; then
55- send_email_report
56- check_result $E_RESTART " $PROXY_SYSTEM restart failed"
57- fi
52+ # background restart
53+ if [ " $1 " = ' background' ]; then
54+ # Restart system
55+ sleep 2
56+ service $PROXY_SYSTEM restart > /dev/null 2>&1
57+ if [ $? -ne 0 ]; then
58+ send_email_report
59+ check_result $E_RESTART " $PROXY_SYSTEM restart failed"
60+ fi
61+
62+ # Update restart queue
63+ if [ -e " $VESTA /data/queue/restart.pipe" ]; then
64+ sed -i " /$SCRIPT /d" $VESTA /data/queue/restart.pipe
65+ fi
5866
59- # Update restart queue
60- if [ -e " $VESTA /data/queue/restart.pipe" ]; then
61- sed -i " /$SCRIPT /d" $VESTA /data/queue/restart.pipe
67+ exit ;
6268fi
6369
70+ touch /tmp/restart-nginx
71+ nohup $BIN /v-restart-proxy ' background' & > /dev/null &
6472
6573# ----------------------------------------------------------#
6674# Vesta #
You can’t perform that action at this time.
0 commit comments