1 Star 0 Fork 0

zhoujy-aust/cloud-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nginx.sh 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhoujy-aust 提交于 2024-09-05 19:43 +08:00 . second commit
#!/bin/bash
if [ $# -eq 0 ];then
echo "please input the argument: "
echo " start -----> start the nginx"
echo " stop -----> stop the nginx"
echo " reload -----> reload the nginx"
exit 1
fi
case $1 in
start)
sudo /usr/local/nginx/sbin/nginx
if [ $? -eq 0 ];then
echo "nginx start success ..."
else
echo "nginx start fail ..."
fi
;;
stop)
sudo /usr/local/nginx/sbin/nginx -s quit
if [ $? -eq 0 ];then
echo "nginx stop success ..."
else
echo "nginx stop fail ..."
fi
;;
reload)
sudo /usr/local/nginx/sbin/nginx -s reload
if [ $? -eq 0 ];then
echo "nginx reload success ..."
else
echo "nginx reload fail ..."
fi
;;
*)
echo "do nothing ..."
;;
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoujy-aust/cloud-demo.git
[email protected]:zhoujy-aust/cloud-demo.git
zhoujy-aust
cloud-demo
cloud-demo
master

搜索帮助