Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ startup script for mud

startup script for mud

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Jason   (109 posts)  Bio
Date Wed 07 Feb 2007 12:11 AM (UTC)
Message
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
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #1 on Wed 07 Feb 2007 12:27 AM (UTC)
Message
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.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Jason   (109 posts)  Bio
Date Reply #2 on Wed 07 Feb 2007 12:41 AM (UTC)
Message
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
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Wed 07 Feb 2007 03:37 AM (UTC)
Message
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.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Jason   (109 posts)  Bio
Date Reply #4 on Wed 07 Feb 2007 03:42 AM (UTC)
Message
ok yeah when i opened that rc.local it seems to be an exact copy of the one i already edited
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Wed 07 Feb 2007 03:55 AM (UTC)
Message
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.)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #6 on Wed 07 Feb 2007 04:00 AM (UTC)
Message
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. ;)

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Jason   (109 posts)  Bio
Date Reply #7 on Wed 07 Feb 2007 04:20 AM (UTC)
Message
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
Top

Posted by Jason   (109 posts)  Bio
Date Reply #8 on Thu 08 Feb 2007 01:59 AM (UTC)
Message
ok I've read the website but i can't figure out how to make the startup script.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #9 on Thu 08 Feb 2007 05:24 AM (UTC)
Message
Please paste what you have in your rc.local file that is not working.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Jason   (109 posts)  Bio
Date Reply #10 on Thu 08 Feb 2007 04:02 PM (UTC)

Amended on Thu 08 Feb 2007 04:05 PM (UTC) by Jason

Message
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
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #11 on Thu 08 Feb 2007 05:47 PM (UTC)
Message
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

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


30,598 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.