|
well here is the problem .. we run 3 games server programs on the same machine running on different ports.
here's how they start:
./hlds_run -game cstrike -port 27015
./hlds_run -game cstrike -port 27016
./hlds_run -game tfc -port 27018
of course they are all in different directories. So the problem with the suggestion above is what redhead pointed out. all servers will shutdown. could i use the port prameter in the grep?
-----
there used to be a special way of starting the process and assigning a name to it. so i could type "kill hlds_1" or "kill_hlds_2". that was a long time ago and i totally forgot how, but i know it exists.
--------
another possibility is that i can start it in a screen with a name, but i don't know how to make a script open and kill the process in the screen.
for example, to start the game in screen i would do something like this: [SHELL]$ screen -A -m -d -S hlds_1 ./hlds_run -game cstrike[/SHELL]this is cool because it automatically starts the process in a screen and detaches it. when i need to call up the process, i type [SHELL]$ screen -r hlds_1[/SHELL] . so now i wonder if i can kill the process in the screen named hlds_1
|