startup script for mud

Posted by Jason on Wed 07 Feb 2007 12:11 AM — 12 posts, 40,929 views.

#0
Ok here is what i am trying to do...
I want my mud to startup automaticly on my server when the server boots up. I am running RHEL 3. I've tried to add the line:
/home/tagart/gb/bin/startup &

to my rc.local file.... that didn't work

i tried to add it in the sessions to startup when my username logs in... that didn't work...

the i went into the terminal and i did a:
chmod +x /home/koumintang/gb/bin/startup &

to see if it will start it up and i got this:

# chmod +x /home/koumintang/gb/bin/startup &
[1] 2935

then then when i type anything else it does this:
[1]+ Done chmod +x /home/koumintang/gb/bin/startup

I'm assuming it means that it isn't staying up but not sure..... if you have any suggestions on how to get my mud to startup as soon as my server is turned on... please help me out

thanx
USA #1
Where is your mud's startup file?
You said that you tried to put in your rc.local file "/home/tagart/gb/bin/startup &" but that in terminal you tried "chmod +x /home/koumintang/gb/bin/startup &".

I have no idea why you'd want to run chmod on your startup file instead of running the startup file itself, but all you should need to do is put into your rc.local file, or a crontab, "cd /home/koumintang/gb/bin;./startup &" ...at least, I think that's all you'd need, if I'm reading your question correctly.
#2
ok it is under the koumintang one.. i put them in the right way... i put it in the rc.local under the koumintang home folder
that was a typo on my part here
USA #3
That's different, those files are for when you log in, not when the system starts.

First off; is this a system you administer yourself or a system administered by someone else?

If it's your system, you might want to read:
http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html

basically you need to edit the file /etc/rc.d/rc.local.
#4
ok yeah when i opened that rc.local it seems to be an exact copy of the one i already edited
USA #5
You need to be more precise, please... could you give the full paths of the two files that are supposed to be identical.

And also, is this a system you administer or not. (I'm assuming it is since you were apparently able to edit the system file but I want to be sure.)
USA #6
I think what David is trying to say is that if you want it to start up when your computer boots up, you're far better off creating a crontab for it set to @reboot rather than inserting it in your rc.local file. But if you're the one administering the system, he's giving you a link there that looks well worth the read, although it may not be the easiest read you've ever encountered. ;)
#7
ok, the /ect/rc.local was a short cut to the other.. therefore it edited it the right place... and yes i am the admin for the server
#8
ok I've read the website but i can't figure out how to make the startup script.
USA #9
Please paste what you have in your rc.local file that is not working.
#10
Well i appriciate all the help. and i figured out what the problem was. I didn't think about it running in root when the system would be at startup So i had to alter my startup script for the game it's self to
But for anyone else who is having a problem with this... OR might want to know how to do it in the future. here it is:

in the rc.local file put the path from the root home folder to the muds startup script i.e.

                ../home/koumintang/gb/bin/startup &
exits root home-^  ^------------------------------^  path to the muds startup script

now in your mud startup script change
 ../area

to
../home/koumintang/gb/area



just remember this is for a SMAUG type mud and on a Red Hat Linux but should also work on FEDORA Linux
Amended on Thu 08 Feb 2007 04:05 PM by Jason
USA #11
Good that you figured out the problem. You should use absolute paths, not relative paths. Just remove the ".." in front of "/home/" and you should be fine