Commit 4f50ca9f authored by szh's avatar szh

只有一个可执行编译程序的时候自启动

parent 1e3df323
...@@ -2,12 +2,18 @@ ...@@ -2,12 +2,18 @@
ss -tunl | grep 8801 &> /dev/null ss -tunl | grep 8801 &> /dev/null
Z=`echo $?` Z=`echo $?`
if [[ $Z != 0 ]];then if [[ $Z != 0 ]];then
S=`find /media -name "v7-bityuan"` N=`find /media -name "v7-bityuan"`
if [[ "$S" != "" ]];then echo $N
arr=(${N// / })
num=${#arr[*]}
echo ${arr[0]}
if [[ "$num" == "1" ]];then
echo "v7-bituan is starting" echo "v7-bituan is starting"
nohup $S & chmod +x ${arr[0]}
nohup ${arr[0]} &
else
echo "too many node"
fi fi
else else
echo "v7-bityuan is running" echo "v7-bityuan is running"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment