@@ -50,47 +50,31 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
5050fi
5151
5252if [ -f " $HESTIA /web/inc/nginx_proxy" ]; then
53-
54- # if hestia is behind default nginx, restart in background with 15 sec delay
55- # background restart
56- if [ " $1 " = ' background' ]; then
57- # Restart system
58- sleep 15
59- service $PROXY_SYSTEM restart > /dev/null 2>&1
60- # if [ $? -ne 0 ]; then
61- # send_email_report
62- # check_result $E_RESTART "$PROXY_SYSTEM restart failed"
63- # fi
64-
65- # Update restart queue
66- if [ -e " $HESTIA /data/queue/restart.pipe" ]; then
67- sed -i " /$SCRIPT /d" $HESTIA /data/queue/restart.pipe
68- fi
69-
70- exit ;
71- fi
72-
73- # try to reload to get changes faster
74- service $PROXY_SYSTEM reload
75-
76- # send to background process
77- nohup $BIN /v-restart-proxy ' background' & > /dev/null &
78-
79- else
80-
81- # Default behaviour
82- # Restart system
83- service $PROXY_SYSTEM restart > /dev/null 2>&1
84- # if [ $? -ne 0 ]; then
85- # send_email_report
86- # check_result $E_RESTART "$PROXY_SYSTEM restart failed"
87- # fi
88-
89- # Update restart queue
90- if [ -e " $HESTIA /data/queue/restart.pipe" ]; then
91- sed -i " /$SCRIPT /d" $HESTIA /data/queue/restart.pipe
92- fi
93-
53+ # if hestia is behind default nginx, restart in background with 15 sec delay
54+ # background restart
55+ if [ " $1 " = ' background' ]; then
56+ # Restart system
57+ sleep 15
58+ $BIN /v-restart-service $PROXY_SYSTEM > /dev/null 2>&1
59+
60+ # Update restart queue
61+ if [ -e " $HESTIA /data/queue/restart.pipe" ]; then
62+ sed -i " /$SCRIPT /d" $HESTIA /data/queue/restart.pipe
63+ fi
64+
65+ exit ;
66+ fi
67+ # Send to background process
68+ nohup $BIN /v-restart-proxy ' background' & > /dev/null &
69+ else
70+ # Default behaviour
71+ # Restart system
72+ $BIN /v-restart-service $PROXY_SYSTEM > /dev/null 2>&1
73+
74+ # Update restart queue
75+ if [ -e " $HESTIA /data/queue/restart.pipe" ]; then
76+ sed -i " /$SCRIPT /d" $HESTIA /data/queue/restart.pipe
77+ fi
9478fi
9579
9680# ----------------------------------------------------------#
0 commit comments