You are an unregistered user, you can register here
Navigation

Information

Site

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


 
Go Back   The Unreal Admins Page > Forums > Unreal Admins > Unreal > Unreal Server - General Chat

Reply
Thread Tools Display Modes
  #1  
Unread 11th February, 2010, 09:33 PM
SoNY_scarface SoNY_scarface is offline
Holy Shit!!
 
Join Date: Mar 2007
Posts: 1,726
Default 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
__________________




Reply With Quote
  #2  
Unread 12th February, 2010, 06:51 AM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

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.
__________________

UT-FILES.COM
Get your files
Reply With Quote
  #3  
Unread 12th February, 2010, 12:01 PM
SoNY_scarface SoNY_scarface is offline
Holy Shit!!
 
Join Date: Mar 2007
Posts: 1,726
Default

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....
__________________




Reply With Quote
  #4  
Unread 12th February, 2010, 04:59 PM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

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.
__________________

UT-FILES.COM
Get your files
Reply With Quote
  #5  
Unread 13th February, 2010, 09:00 AM
rork's Avatar
rork rork is offline
Godlike
 
Join Date: Nov 2007
Posts: 265
Default

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.
__________________
Admin of XOL DOG CTF Fun server: 81.169.188.18 - Stats & dU Coop: 85.14.203.180:5555 - Forum
Reply With Quote
  #6  
Unread 13th February, 2010, 07:30 PM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

Quote:
Originally Posted by rork View Post
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.
__________________

UT-FILES.COM
Get your files
Reply With Quote
  #7  
Unread 14th February, 2010, 10:47 AM
rork's Avatar
rork rork is offline
Godlike
 
Join Date: Nov 2007
Posts: 265
Default

Quote:
Originally Posted by 2399Skillz View Post
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.
__________________
Admin of XOL DOG CTF Fun server: 81.169.188.18 - Stats & dU Coop: 85.14.203.180:5555 - Forum
Reply With Quote
  #8  
Unread 14th February, 2010, 01:20 PM
SoNY_scarface SoNY_scarface is offline
Holy Shit!!
 
Join Date: Mar 2007
Posts: 1,726
Default

Ok I will look into cronjobs
__________________




Reply With Quote
  #9  
Unread 14th February, 2010, 11:38 PM
~V~ ~V~ is offline
Holy Shit!!
 
Join Date: Sep 2004
Posts: 866
Default

'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.
Reply With Quote
  #10  
Unread 15th February, 2010, 10:20 AM
Sp0ngeb0b's Avatar
Sp0ngeb0b Sp0ngeb0b is offline
Godlike
 
Join Date: Sep 2008
Location: Germany
Posts: 488
Default

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.
Reply With Quote
  #11  
Unread 15th February, 2010, 12:09 PM
~V~ ~V~ is offline
Holy Shit!!
 
Join Date: Sep 2004
Posts: 866
Default

Quote:
Originally Posted by Sp0ngeb0b View Post
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.
Reply With Quote
  #12  
Unread 15th February, 2010, 02:34 PM
Sp0ngeb0b's Avatar
Sp0ngeb0b Sp0ngeb0b is offline
Godlike
 
Join Date: Sep 2008
Location: Germany
Posts: 488
Default

good question .
always did it this way..
Reply With Quote
  #13  
Unread 15th February, 2010, 08:08 PM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

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.
__________________

UT-FILES.COM
Get your files

Last edited by 2399Skillz : 15th February, 2010 at 08:11 PM.
Reply With Quote
  #14  
Unread 15th February, 2010, 08:13 PM
Sp0ngeb0b's Avatar
Sp0ngeb0b Sp0ngeb0b is offline
Godlike
 
Join Date: Sep 2008
Location: Germany
Posts: 488
Default

Ah guys, of course it's not perfect, but it works
Reply With Quote
  #15  
Unread 15th February, 2010, 08:14 PM
2399Skillz 2399Skillz is offline
Super Moderator
 
Join Date: Jan 2004
Location: North Carolina
Posts: 2,245
Default

Quote:
Originally Posted by Sp0ngeb0b View Post
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.
__________________

UT-FILES.COM
Get your files
Reply With Quote
  #16  
Unread 15th February, 2010, 08:22 PM
Sp0ngeb0b's Avatar
Sp0ngeb0b Sp0ngeb0b is offline
Godlike
 
Join Date: Sep 2008
Location: Germany
Posts: 488
Default

Yea, thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:01 AM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.