PDA

View Full Version : Need help starting the TS2 server on bootup


sQuiZZ
15-05-2003, 01:17
Hi

Can one of you Linux pro's help me with a little problem i have.

I can start the ts2 server just fine, when i do it manuel with the script file.

But I would like to start the ts2 server when the linux is started/rebooted. How do I do that ?.

Allso I dont want it to run as root.

Pleeeeeeeeeaaaase help a linux-newbie :D

Zannox
16-05-2003, 11:26
What flavor of linux are you using?

If its RedHat or Mandrake then edit your /etc/rc.d/rc.local and at the end add the following: '/usr/local/games/tss2_rc2/tss.minimal_startup start'. Make sure you use your full path to the startup script. Don't forget the ' at the begining and end :) Hope this helps!

This may apply to other flavors of linux but I haven't used them or don't know for sure :rolleyes:

sQuiZZ
17-05-2003, 10:42
Hi

Thanks for replying

Sorry but it didn't work, I got this error

/etc/rc.d/rc.local: line 8: /usr/local/games/tss2_rc2/tss.minimal_startup start: No such file or directory

Im using RH9

Thanks

sQuiZZ

Zannox
17-05-2003, 23:01
Hmmmm......it seems upon further checking that the script will not work unless your are IN the directory. I'm looking at how to get it to launch at startup myself now. I didn't have it set that way myself and that is how I start other programs I want to start at boot-up.

I even tried putting /usr/local/games/tss2_rc2/server_linux in the rc.local and it fails too. I'll see what I can do next.:eek:

Zannox
17-05-2003, 23:15
Ok, I got it working and starting at boot on RedHat 9. This is how I did it.

I created my own script in /usr/local/games/tss2_rc2 named ts_start. The script contained the following:

#! /bin/bash
cd /usr/local/games/tss2_rc2
./server_linux

Make sure to change the permissions on the newly created script with the following chmod 755 /usr/local/games/tss2_rc2/ts_start

I then edited my /etc/rc.d/rc.local and added the following:

/usr/local/games/tss2_rc2/ts_start

Now it starts at boot :D

Maybe I should mention that I created the above file using VI editor. You can use any editor you like, I am just biased toward vi :/

sQuiZZ
18-05-2003, 12:15
Hi

Thanks a million

IT WORKS

I changed it a little bit, but thanks to you it works.

Thanks again

sQuiZZ

Zannox
19-05-2003, 01:57
Your welcome, anytime :) I'm glad I could help :)

vitoto
09-06-2003, 05:03
Hi, guys.

i have in my rc.local
/tmp/opt/tss2_rc2/ts_start

and inside ts_start

#! /bin/bash
cd /tmp/opt/tss2_rc2
./server_linux


I TRY MULTIPLE METHOD THE STARUP TS2 IN RH 7.2.

how i can fix that ?

MMmmGood
09-06-2003, 18:38
That's one way to do it I guess....you could always put this in your rc.local, which is what I did, and it works fine.

cd /usr/local/games/tss2_rc2/; ./tss_minimal_start_script start

CowboyGuy
12-06-2003, 05:24
Just to be different... well, actually I started trying to make it the same as all the other applications....

1) Installed the program in /var/tss2_rc2 (pick your own favorite...)
2) I created a link
ln -s /var/tss2_rc2/tss.minimal_startscript /etc/init.d/tss2
3) added to /etc/rc.d/rc.local
/etc/init.d/tss2 start

all these steps fail until you alter the original script! (most of you had the same issue). It installs with the folowing command inder the start section:
./server_linux -PID=tsserver2.pid
That line is written only to work from within the installation directory. so, add the cd <install directory> command or... alter the command line like:
/var/tss2_rc2/server_linux -PID=var/tss2_rc2/tsserver2.pid

Remember /var/tss2_rc2 is My installation directory - check your own location.

So, now I can run /etc/init.d/tss2 start|restart|stop

Next question.... How can I get the servers to automatically start when running...server_linux [re]start?

kleptophobiac
15-06-2003, 00:18
How would one do this without running it as root?

CowboyGuy
15-06-2003, 04:24
You could look at Linux/Unix documentation and get an understanding of setuid.

evil_bunnY
27-06-2003, 14:43
Originally posted by CowboyGuy
You could look at Linux/Unix documentation and get an understanding of setuid.

thats only partially useful. its a much better idea to run it in a changed root jail, there's a thread about that.

NHawk
28-06-2003, 00:51
Originally posted by MMmmGood
That's one way to do it I guess....you could always put this in your rc.local, which is what I did, and it works fine.

cd /usr/local/games/tss2_rc2/; ./tss_minimal_start_script start This works for me to. :)