代码拉取完成,页面将自动刷新
#!/bin/bash
#chkconfig: 2345 40 80
#description:starts,stop and saves iptables firewall
[ -f /etc/init.d/functions ]&&. /etc/init.d/functions
pidfile=/iflytek/nginx/logs/nginx.pid
start(){
if [ -f $pidfile ];then
echo "nginx is running"
else
/iflytek/nginx/sbin/nginx &>/dev/null
action "nginx is started" /bin/true
fi
}
stop(){
if [ -f $pidfile ];then
/iflytek/nginx/sbin/nginx -s stop &>/dev/null
action "nginx is stopped" /bin/true
else
action "nginx is stopped" /bin/false
fi
}
reload(){
if [ -f $pidfile ];then
/iflytek/nginx/sbin/nginx -s reload &>/dev/null
action "nginx is reloaded" /bin/true
else
echo "cat't open $pidfile,no such file or directory"
fi
}
case $1 in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
restart)
stop
sleep 3
start
RETVAL=$?
;;
reload)
reload
RETVAL=$?
;;
*)
echo "$0 {start|stop|restart}"
exit 1
esac
exit $RETVAL
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。