1 Star 0 Fork 1

子不语/shell_bag

forked from godcheese/shell_bag 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nginx.service.sh 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
godcheese 提交于 2020-08-04 12:56 . Initial commit
#! /bin/sh
# chkconfig: - 85 15
PATH=/web/server/nginx/sbin
DESC="nginx daemon"
NAME=nginx
DAEMON=/web/server/nginx/sbin/$NAME
CONFIGFILE=/web/server/nginx/conf/$NAME.conf
PIDFILE=/web/server/nginx/logs/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
set -e
[ -x "$DAEMON" ] || exit 0
do_start() {
$DAEMON -c $CONFIGFILE || echo -n "nginx already running"
}
do_stop() {
$DAEMON -s stop || echo -n "nginx not running"
}
do_reload() {
$DAEMON -s reload || echo -n "nginx can't reload"
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
do_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
do_stop
echo "."
;;
reload|graceful)
echo -n "Reloading $DESC configuration..."
do_reload
echo "."
;;
restart)
echo -n "Restarting $DESC: $NAME"
do_stop
do_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|reload|restart}" >&2
exit 3
;;
esac
exit 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/oneren/shell_bag.git
git@gitee.com:oneren/shell_bag.git
oneren
shell_bag
shell_bag
master

搜索帮助