Kill Processes Script

Posted On // Leave a Comment

Hey,

Atm i am using that script to kill one gameserver



NAME="srcds"

echo "Trying to kill $NAME..."

PID=ps -e | grep $NAME | awk '{print $1}'

echo "Process id $PID. Trying to send the TERM signal..."

kill $PID

echo "Done."


But i want to run multiple gameservers, the only difference would be:

screen -adms gmod01 /home/gmod/Warserver/gmod/srcds_run -console -game garrysmod +map gm_flatgrass +maxplayers 28

screen -adms gmod02 /home/gmod/Build/gmod/srcds_run -console -game garrysmod +map gm_flatgrass +maxplayers 20



idea how to get exactly the pid of one from booth?


http://ift.tt/1dvHQ0Z

0 comments:

Post a Comment