We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c51af3 commit 04e3413Copy full SHA for 04e3413
1 file changed
bin/v-restart-proxy
@@ -52,7 +52,8 @@ fi
52
# background restart
53
if [ "$1" = 'background' ]; then
54
# Restart system
55
- sleep 20
+ sleep 300
56
+ rm /tmp/restart-nginx
57
service $PROXY_SYSTEM restart >/dev/null 2>&1
58
if [ $? -ne 0 ]; then
59
send_email_report
@@ -67,6 +68,16 @@ if [ "$1" = 'background' ]; then
67
68
exit;
69
fi
70
71
+if [ -f "/tmp/restart-nginx" ]; then
72
+ exit;
73
+fi
74
+
75
+service $PROXY_SYSTEM reload
76
+if [ $? -ne 0 ]; then
77
+ send_email_report
78
+ check_result $E_RESTART "$PROXY_SYSTEM reload failed"
79
80
81
touch /tmp/restart-nginx
82
nohup $BIN/v-restart-proxy 'background' &>/dev/null &
83
0 commit comments