Posts: 12
Threads: 4
Joined: Oct 2007
Reputation:
0
Hi, i know that looks quite strange with all the pose of people trying to launch a server, but i encounter a problem with my tf2 server under linux.
I'd like to stop the server not via rcon but under a ./srcds_run command for a script.
I tried quit an exit but it restart on its own each time.
If anybody can help.
Posts: 94
Threads: 10
Joined: Jan 2007
Reputation:
0
top
and kill process number..
or if its running on a screen
screen -r
kill screen number
Posts: 99
Threads: 11
Joined: Jun 2007
Reputation:
0
Or you can type
ps ux
..and which line(s) have srcds_run in them and do:
kill 432
(if 432 is the PID)
Posts: 14
Threads: 2
Joined: Nov 2007
Reputation:
0
if your in a screen you can also do a
screen -S DSServer -X quit
assuming you ran the screen command with ' -S DSServer ' switch
Posts: 9
Threads: 3
Joined: Feb 2008
Reputation:
0
02-23-2008, 03:29 AM
(This post was last modified: 02-23-2008, 03:34 AM by KTM450SX.)
sorry to bring up an old post but Im need the same thing.
Im running a server at home, but I just SSH'd in from away from home and want to stop it..I tried this. TOP and PS UX dont show anything with srcds_run in them, but the server is still running? wth? I just connected to it in TF2. If i try restarting it with ./srcds_run blalba i still keep joining the "lingering" one that has the wrong map running.
Also tried
sudo killall -9 srcds_run
srcds_run: no process killed
but my server is still running...im confused.
Posts: 728
Threads: 2
Joined: May 2006
Reputation:
0
if it's running in screen, just do screen -r or screen -r serverscreenname then ctrl+c and that will stop it.
Posts: 9
Threads: 3
Joined: Feb 2008
Reputation:
0
Hmm ok i'll try that.
it was running in a ubuntu terminal window at home..then i came to work and SSH'd in and couldnt figure out how to kill it. will screen do what I want?
Posts: 14
Threads: 2
Joined: Nov 2007
Reputation:
0
when you do the ps to find the pid of the server .. you will most likely need to sudo ps ...
a usefull command ( dont know if it works in ubuntu but it does in fedora/rh ) is
sudo ps aux --forest
just because their are more than a few times where somthing will look like it's running and it looks like you killed it , but it still has a parent somewhere that respawns it.
screen is still the best way to run any process that doesnt allready have a deamon option.
their are a good deal of screen/expect tricks you can do to build web based interfaces that would allow you to send commands to a running process in a screen ... but thats a whole other thread.