diff --git a/restart.sh b/restart.sh new file mode 100755 index 0000000..2ef15cf --- /dev/null +++ b/restart.sh @@ -0,0 +1,17 @@ +#! /bin/bash -e +echo "server git pull" +git pull +echo "src/csvdata git pull" +cd src/csvdata +pwd +git pull +cd ../../ +echo "check status" +port=`cat src/main.lua | grep 'services/ngxd' | sed 's/)//g' | awk '{printf $5}'` +echo 'prot '$port +pid=$(lsof -i:$port | grep skynet | awk '{print $2}') +if [ -n "$pid" ]; then + echo 'kill old server pid '$pid + kill -9 $pid +fi +skynet/skynet src/config \ No newline at end of file -- libgit2 0.21.2