标签:val kconfig sage rc.d mon pre cal nginx name
#!/bin/bash # nginx Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig: - 85 15 # description: Nginx is a high-performance web and proxy server. # It has a lot of features, but it‘s not for everyone. # processname: nginx nginx_sbin=/usr/local/nginx/sbin/nginx nginx_config=/usr/local/nginx/conf/nginx.conf nginx_pid=/var/run/nginx.pid RETVAL=0 #source function library . /etc/rc.d/init.d/functions #source networking . /etc/sysconfig/network [ -x ${nginx_sbin} ] || exit 0 #starting nginx server start(){ echo -n "starting nginx..." daemon ${nginx_sbin} -c ${nginx_config} RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/run/nginx_lock return $RETVAL } stop() { echo -e "Stopping nginx....." killproc ${nginx_sbin} RETVAL=$? [ $RETVAL = 0 ] && rm -f /var/run/nginx_lock } restart() { stop sleep 5 start } case $1 in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: nginx {start|stop|restart}" exit esac
标签:val kconfig sage rc.d mon pre cal nginx name
原文地址:https://www.cnblogs.com/fengyongtao/p/10255595.html