Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ need hint on running multiple instance of same programe

Posted by: jeanseb1987 Apr 12 2009, 08:07 AM


im new to linux, im running on a virtual private server http ftp and a game server called sa-mp

to start the sa-mp server i find an .sh script that i've put in the init.d folder.
so far so good.
here is the script im using:


process=`ps auxw | grep samp02Xsvr | grep -v grep | awk '{print $11}'`

if [ -z "$process" ]; then

echo "sa-mp server not running, restarting it."
cd "$sampdir"
nohup ./samp02Xsvr &
echo ""


My question is: what do i need to do to be aible to run 2 instance of the same processe and have them auto-restart like it does for 1 server???

thank you for your time !!!

Posted by: michaelk Apr 12 2009, 10:23 AM

Not a game player so I know nothing about sa-mp. I am also not sure what your goals are but you can not run a second instance of the game using the same UDP
port. I am not sure if you can specify a configuration file that is not in the top directory of the server. I suppose you would need to create a 2nd copy of the server with its own config file and then create another init script.

Posted by: jeanseb1987 Apr 12 2009, 10:44 AM

Thank you

i find my solution.

i simply rename each process to a different name.
each process have an .sh script that is in crontab

thank you anyway for your help

Powered by Invision Power Board (
© Invision Power Services (