mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Restart nginx in background
This commit is contained in:
parent
a57c8b775b
commit
b04dce9ce3
1 changed files with 18 additions and 10 deletions
|
@ -49,18 +49,26 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart system
|
# background restart
|
||||||
service $PROXY_SYSTEM reload >/dev/null 2>&1
|
if [ "$1" = 'background' ]; then
|
||||||
if [ $? -ne 0 ]; then
|
# Restart system
|
||||||
send_email_report
|
sleep 2
|
||||||
check_result $E_RESTART "$PROXY_SYSTEM restart failed"
|
service $PROXY_SYSTEM restart >/dev/null 2>&1
|
||||||
fi
|
if [ $? -ne 0 ]; then
|
||||||
|
send_email_report
|
||||||
# Update restart queue
|
check_result $E_RESTART "$PROXY_SYSTEM restart failed"
|
||||||
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
|
fi
|
||||||
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
|
|
||||||
|
# Update restart queue
|
||||||
|
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
|
||||||
|
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
touch /tmp/restart-nginx
|
||||||
|
nohup $BIN/v-restart-proxy 'background' &>/dev/null &
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue