You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
248 B
Bash

if [ -f "pid.main" ];then
pid=`cat pid.main`
echo "Stop Server main Process Id:$pid"
kill $pid
rm -f pid.main
fi
chmod 777 ./main
"./main" > ./log/main.log 2> ./log/main.error &pid=$!
echo "$pid" > pid.main
echo "main Sever Process Id:$pid"