linux  脚本自启动软件 

修改/etc/rc.local
/etc/rc.local[root@c69-01 scripts]# tail -n 1 /etc/rc.local
/bin/bash /server/scripts/qidong.sh >/dev/null 2>/dev/null
#!/bin/sh

while true
do
ps -ef | grep "readasync tmr://localhost --ant 1" | grep -v "grep"
if [ "$?" -eq 1 ]
then
./home/debian/mercuryapi-1.31.5.19/c/src/api/readasync tmr://localhost --ant 1 #鍚姩搴旂敤
echo "process has been restarted!"
else
echo "process already started!"
fi
sleep 5
done