Ubuntu18寮€鏈烘墽琛宻hell鍛戒护
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu18寮€鏈烘墽琛宻hell鍛戒护相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/starting' title='starting'>starting
start echo 缁堢 ps aux else 鑴氭湰 shel wc -l1.鎵撳紑shell缁堢,杈撳叆
sudo vi /etc/rc.local
2.鍦ㄧ紪杈戝櫒閲岄潰杈撳叆鑷繁瑕佸惎鍔ㄧ殑鑴氭湰
#!/bin/bash echo "run incar ai program..." cd /opt/robot nohup bash autorobot.sh & 2>/dev/null
3.鍚姩鑴氭湰绀轰緥
#!/bin/bash #ppp connection errcount=0 while true do if (( $errcount > 10 )); then echo "rebooit" fi echo "errcount is $errcount" airobot=$(ps aux | grep airobot | grep -v grep |wc -l) echo $airobot if [ $airobot -eq 0 ]; then sleep 1 echo "no cold process" echo "starting" nohup ./airobot & errcount=$(( $errcount + 1 )) else echo "process exsits" fi sleep 10 done
銆€銆€
以上是关于Ubuntu18寮€鏈烘墽琛宻hell鍛戒护的主要内容,如果未能解决你的问题,请参考以下文章