BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 3rd, 2004, 03:30 AM
Joe[GTV] Joe[GTV] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 74 Joe[GTV] User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 9 m 51 sec
Reputation Power: 5
Exclamation Autorestarting For Game Servers

In the past I've used the inittab feature on linux to set all my gameservers to autorestart if they crash or go down for whatever reason. Obviously FreeBSD does not have inittab, so I was wondering what I could use that's built into FreeBSD, or what program I could use to monitor the gameserver and autorestart it if it goes down? I tried monitord with no success, no matter what I tried it wouldn't work.

Thank you for your help in advance.

Last edited by Joe[GTV] : May 3rd, 2004 at 03:39 AM.

Reply With Quote
  #2  
Old May 3rd, 2004, 12:20 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,442 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 49 m 40 sec
Reputation Power: 797
man 8 init

Partial quote from the man page:
Code:
     The init utility can also be used to keep arbitrary daemons running,
     automatically restarting them if they die.  In this case, the first field
     in the ttys(5) file must not reference the path to a configured device
     node and will be passed to the daemon as the final argument on its com-
     mand line.  This is similar to the facility offered in the AT&T System V
     UNIX /etc/inittab.


Another alternative would be to use djb's daemontools (http://cr.yp.to/daemontools.html)
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
  #3  
Old May 4th, 2004, 03:36 AM
Joe[GTV] Joe[GTV] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 74 Joe[GTV] User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 9 m 51 sec
Reputation Power: 5
So where would I be putting the startup lines for the game servers?

Reply With Quote
  #4  
Old May 4th, 2004, 11:50 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
ttys(5) is in /etc

M.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #5  
Old May 5th, 2004, 01:05 AM
Joe[GTV] Joe[GTV] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 74 Joe[GTV] User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 9 m 51 sec
Reputation Power: 5
I understand that, but what syntax would I use?

Say I want to run an hltv, which is ran by simply su - to the user and ./hltv

What syntax would I use?

Reply With Quote
  #6  
Old May 10th, 2004, 12:37 AM
Joe[GTV] Joe[GTV] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 74 Joe[GTV] User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 9 m 51 sec
Reputation Power: 5
bump, anyone?

Reply With Quote
  #7  
Old May 12th, 2004, 04:00 AM
Joe[GTV] Joe[GTV] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 74 Joe[GTV] User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 9 m 51 sec
Reputation Power: 5
I tried..

-- "/root/scripts/hltv1-ttys.sh" unknown on
-- "/root/scripts/hltv2-ttys.sh" unknown on
-- "/root/scripts/hltv3-ttys.sh" unknown on
-- "/root/scripts/hltv4-ttys.sh" unknown on


but only hltv4 will startup and autorestart when it goes down :/

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Autorestarting For Game Servers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway