A-A+
自动更新程序Shell脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#/bin/bash #### SPATH="/var/yuqing_4.0/isearch" DPATH="/data/repos/IGet/release/linux_64" MID=`ps aux|grep monitor|grep -v grep|awk '{print $2}'` SID=`ps aux|grep search|grep -v grep|awk '{print $2}'` IP=`ifconfig|grep -Ev "(127.0.0.1|192.168.133.)"|awk -F: '/inet / {print $2}'|awk '{print $1}'|awk -F. '{print $4}'` cd $SPATH /bin/cp -f $DPATH/$2 ./bin/ chmod +x ./bin/$2 sed -i "s#$1#$2#g" monitor.sh kill $MID sleep 3 sh ISearch.sh && kill $SID rm -f ./bin/$1 |