View Single Post

  #1 (permalink)  
Old 04-12-2006, 06:18 AM
sparky sparky is offline
Member
User
 
Join Date: Mar 2006
Posts: 35
Rep Power: 0
sparky
Default Help with killing

HI guys me again my counterstrike script is coming on greatguns now over 600 hundread lines long now (599 of them are coments )
This is what the user see when they log in

What do you wish to do ? anwser 1 to 10

1. Start css server
2. Change rcon pass word
3. View server start details
4. Add user details
5 View user detail
6. Server.cfg tick conf
7. Restart Servers
8. Teamspeak options
9. Search for records
10. Delete records

Answer (or 'q' to quit)?
all i need to do now is sort out options 7 and 8 . but i am having trouble with option 7 stopping and restart servers what i want to happen is if the user chooses to restart server he enters a port number then i need to get the pid number for that server and kill it.
if they want to stop server i need to get two pid numbers and kill

heres the two commands from ps -aux

./srcds_amd -game cstrike -port 27025 +ip 194.105.134.151 +maxplayer
/bin/sh ./srcds_run -game cstrike -port 27025 +ip 194.105.1

to restart i just need to kill top line
to stop server i would kil both

Any help would be great
Reply With Quote