1 Star 0 Fork 0

小猪会飞/Shell

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nano.sh 773 Bytes
一键复制 编辑 原始数据 按行查看 历史
小猪会飞 提交于 2020-05-11 21:55 +08:00 . 常用的Shell
#!/bin/bash
##### Nano管理脚本 #####
##### Author:MoTao<motaoxx@outlook.com #####
##### Update:2020/05/10 #####
#nano的文件路径
core='/opt/nano/core/core'
cell='/opt/nano/cell/cell'
frontend='/opt/nano/frontend/frontend'
#如果参数不存在,则默认启动nano相关服务
if [ ! $1 ]
then
$core start
$cell start
$frontend start
exit
fi
#根据不同的选项执行不同的操作
case $1 in
'start')
$core start
$cell start
$frontend start
;;
'status')
$core status
$cell status
$frontend status
;;
'stop')
$core stop
$cell stop
$frontend stop
;;
'restart')
$core stop
$cell stop
$frontend stop
sleep 5s
$core start
$cell start
$frontend start
;;
*)
echo 'Parameter error!'
exit
;;
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/pigfei/Shell.git
git@gitee.com:pigfei/Shell.git
pigfei
Shell
Shell
master

搜索帮助