| #!/bin/bash |
| |
| |
| |
| aboss5_flag=0 |
| aboss2_flag=0 |
| mycat_flag=0 |
| mysql_flag=0 |
| Svn_flag==0 |
| |
| |
| procmgr5_ids=`ps x | grep procmgr | grep -v "grep" | awk '{print $1}'` |
| for id in $procmgr5_ids |
| do |
| pathDir=`ls -al /proc/$id/cwd | awk '{print $NF}'` |
| echo [$id]:[$pathDir] |
| if [[ "$pathDir" == *"aboss5"* ]]; then |
| aboss5_flag=1 |
| echo "[NOTE] aboss5 procmgr is already started." |
| fi |
| done |
| |
| |
| procmgr2_ids=`ps x | grep procmgr | grep -v "grep" | awk '{print $1}'` |
| for id in $procmgr2_ids |
| do |
| pathDir=`ls -al /proc/$id/cwd | awk '{print $NF}'` |
| echo [$id]:[$pathDir] |
| if [[ "$pathDir" == *"aboss2"* ]]; then |
| aboss2_flag=1 |
| echo "[NOTE] aboss2 procmgr is already started." |
| fi |
| done |
| |
| |
| if [ "$aboss5_flag" == "0" ]; then |
| cd ~/aboss5/bin |
| ./procmgr -d& |
| fi |
| |
| |
| if [ "$aboss2_flag" == "0" ]; then |
| cd ~/aboss2/bin |
| |
| ./procmgr -d& |
| fi |
| |
| |
| if [ "$mycat_flag" == "0" ]; then |
| mycat_id=`ps x | grep mycat | grep -v "grep" | awk '{print $1}'` |
| if [ -z "$mycat_id" ]; then |
| cd ~/mycat/bin |
| ./mycat start |
| else |
| mycat_flag=1 |
| echo "[NOTE] Mycat is already started." |
| fi |
| fi |
| |
| |
| if [ "$mysql_flag" == "0" ]; then |
| mysql_id=`ps x | grep mysql | grep -v "grep" | awk '{print $1}'` |
| if [ -z "$mysql_id" ]; then |
| echo "[ERROR] Mysql is not running!!!!." |
| else |
| mysql_flag=1 |
| echo "[NOTE] Mysql is already started." |
| fi |
| fi |
| |
| |
| if [ "$Svn_flag" == "0" ]; then |
| Svn_id=`ps x | grep Svn | grep -v "grep" | awk '{print $1}'` |
| if [ -z "$Svn_id" ]; then |
| echo "[ERROR] Svn is not running!!!!." |
| else |
| Svn_flag=1 |
| echo "[NOTE] Svn is already started." |
| fi |
| fi |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端