Nginx和PHP-FPM的启动/重启脚本
服务器上的nginx和php都是源码编译安装的,不支持类似以前的nginx (start|restart|stop|reload)了。自己动手丰衣足食。以下脚本应该在RHEL, Fedora, centos下都适用。
一、Nginx启动脚本/etc/init.d/nginx
#!/bin/bash
#
# Startup script for Nginx - this script starts and stops the nginx daemon
#
# chkconfig:
# description:
# processname: nginx
# config:
# pidfile:
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/local/nginx/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
start() {
}
stop() {
}
restart() {
}
reload() {
}
force_reload() {
}
configtest() {
}
rh_status() {
}
rh_status_q() {
}
case "$1" in
esac
#==============================================================
编辑好后保存,执行以下命令
sudo chmod +x /etc/init.d/nginx
声明:优质手游攻略创作不易,来源:爱钻网。转载务必注明出处:http://www.aizuanapp.com/article/15604.html
① 扫二维码或添加微信号:sjyou_com 关注"爱钻网"
② 领取游戏礼包、手游攻略、新游推荐、游戏陪玩、原创测评
③ 赶紧扫一扫添加吧,Get手游技巧~