12345678910111213141516171819 |
- cd /usr/share/nginx/html/ax-node
- PORT=18061
- netstat -anp | grep $PORT > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- pid=$(netstat -anp | grep $PORT | awk '{print $7}' | cut -d/ -f1)
- kill -9 $pid
- fi
- chmod u+x ./app
- current_time=$(date +"%Y-%m-%d_%H:%M:%S")
- nohup ./app > "ax-node_$current_time.log" 2>&1 &
|