Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Kill Processes Script
New on LowEndTalk? Please Register and read our Community Rules.

Kill Processes Script


Atm i am using that script to kill one gameserver


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?

NanoKVM | Free NAT KVM | Apply here


Sign In or Register to comment.