Quote:
|
Originally Posted by sparky
HI guys me again my counterstrike script is coming on greatguns now over 600 hundread lines long now (599 of them are coments  )
|
LOL 599 comments.
Quote:
|
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.
|
Try netstat to grab pid according to your PORT-NUMBER:
Code:
netstat -p -vant | grep PORT-NUMBER | awk '{ print $7}' | cut -d'/' -f1
netstat -p -vant | grep 27025 | awk '{ print $7}' | cut -d'/' -f1
Quote:
|
to stop server i would kil both
|
Use killall command:
Code:
killall program-name
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat