Donations
|
If you wish to make a donation you can by clicking the image below.
|
|
|
 |

11th February, 2010, 09:33 PM
|
Holy Shit!!
|
|
Join Date: Mar 2007
Posts: 1,726
|
|
ubuntu 8 auto start script
Hi everyone
Does anyone have any idea how to setup an auto start on ubuntu 8? Basically what I am after is....I want my server to start/auto execute when or if my box is rebooted. I also want this script to monitor server crash and try to reboot it if needed.
Any help would be appreciated.
Thanks
|

12th February, 2010, 06:51 AM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,246
|
|
Do you mean the entire server reboot and/or just the game server reboot?
If you want to load services after the entire server reboots, then use cronjobs.
If you want to automatically restart the UT game server after a crash, then use the ASU server script.
|

12th February, 2010, 12:01 PM
|
Holy Shit!!
|
|
Join Date: Mar 2007
Posts: 1,726
|
|
Well I kind of wanted both.
My host periodically reboots all server at the datacenter. It is at these times I would like the server to auto execute, rather than be down for while I am afk and have to start the UT server manually. I would also like this script to auto reboot the UT game server after crash if possible.
I am using the ASU server script but it doesn't seem to be working? Maybe I am doing something wrong....
|

12th February, 2010, 04:59 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,246
|
|
Your data center reboots the servers on a periodically basis without your consistent? I'd find a different data center then.
Using cronjobs is the best way to start services on reboot.
|

13th February, 2010, 09:00 AM
|
 |
Godlike
|
|
Join Date: Nov 2007
Posts: 265
|
|
Cronjobs are meant to start a process at a given time, isn't it better to add a script to /etc/init.d and start it via the right userlevel in /etc/rc#.d, that's how services are meant to start at boot? See also the debian reference.
|

13th February, 2010, 07:30 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,246
|
|
Quote:
Originally Posted by rork
Cronjobs are meant to start a process at a given time, isn't it better to add a script to /etc/init.d and start it via the right userlevel in /etc/rc#.d, that's how services are meant to start at boot? See also the debian reference.
|
Yes you can use that method, but for a novice Linux Admin using cronjobs is easy. The @reboot command in cronjobs is about as easy a script as you can do to run a script after the server reboots.
|

14th February, 2010, 10:47 AM
|
 |
Godlike
|
|
Join Date: Nov 2007
Posts: 265
|
|
Quote:
Originally Posted by 2399Skillz
Yes you can use that method, but for a novice Linux Admin using cronjobs is easy. The @reboot command in cronjobs is about as easy a script as you can do to run a script after the server reboots.
|
Ah, I wasn't aware of the @reboot option in cronjobs. It seems to be the easier way indeed.
|

14th February, 2010, 01:20 PM
|
Holy Shit!!
|
|
Join Date: Mar 2007
Posts: 1,726
|
|
Ok I will look into cronjobs 
|

14th February, 2010, 11:38 PM
|
Holy Shit!!
|
|
Join Date: Sep 2004
Posts: 866
|
|
'man crontab' should help
__________________
http://www.unrealize.co.uk for XConsole, ServerLog, StealthAdmin and other Unreal Tournament mods.
-= F R A G G A L O N I A... R E S U R R E C T I O N! O L D... S K O O L... S N I P E R =- unreal://82.40.94.2
Old skool sniping. Just you, your weapon, and gravity.
|

15th February, 2010, 10:20 AM
|
 |
Godlike
|
|
Join Date: Sep 2008
Location: Germany
Posts: 488
|
|
Little Tutorial :-)
My cronjob looks like this:
Code:
@reboot /home/reboot.sh
It simple calls a .sh file in my home directory, containing this:
Code:
cd /
cd home
cd ut99-server
cd ut-server
./ucc.init start
Last edited by Sp0ngeb0b : 15th February, 2010 at 10:26 AM.
|

15th February, 2010, 12:09 PM
|
Holy Shit!!
|
|
Join Date: Sep 2004
Posts: 866
|
|
Quote:
Originally Posted by Sp0ngeb0b
Little Tutorial :-)
My cronjob looks like this:
Code:
@reboot /home/reboot.sh
It simple calls a .sh file in my home directory, containing this:
Code:
cd /
cd home
cd ut99-server
cd ut-server
./ucc.init start
|
Huh? Why don't you just one cd command?!
cd /home/ut99-server/ut-server
__________________
http://www.unrealize.co.uk for XConsole, ServerLog, StealthAdmin and other Unreal Tournament mods.
-= F R A G G A L O N I A... R E S U R R E C T I O N! O L D... S K O O L... S N I P E R =- unreal://82.40.94.2
Old skool sniping. Just you, your weapon, and gravity.
|

15th February, 2010, 02:34 PM
|
 |
Godlike
|
|
Join Date: Sep 2008
Location: Germany
Posts: 488
|
|
good question  .
always did it this way..
|

15th February, 2010, 08:08 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,246
|
|
Why change directory?
Just use this.
@reboot /home/ut99-server/ut-server/ucc.init restart
edit
I always use "restart" to start the server, just because. You can use start if you want to however.
Last edited by 2399Skillz : 15th February, 2010 at 08:11 PM.
|

15th February, 2010, 08:13 PM
|
 |
Godlike
|
|
Join Date: Sep 2008
Location: Germany
Posts: 488
|
|
Ah guys, of course it's not perfect, but it works 
|

15th February, 2010, 08:14 PM
|
Super Moderator
|
|
Join Date: Jan 2004
Location: North Carolina
Posts: 2,246
|
|
Quote:
Originally Posted by Sp0ngeb0b
Ah guys, of course it's not perfect, but it works 
|
Wasn't saying it didn't work and nothing is really perfect. We are just trying to make your script more efficient, that's all. 
|

15th February, 2010, 08:22 PM
|
 |
Godlike
|
|
Join Date: Sep 2008
Location: Germany
Posts: 488
|
|
Yea, thanks 
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|