[bf1942] does anyone have an working startscript?
charles "wokka" goldsmith
wokka at justfamily.org
Tue Feb 4 18:31:15 EST 2003
This is what I use for auto-restart on crash:
#!/bin/sh
if `killall -CHLD "bf1942_lnxded" >/dev/null 2>&1`; then
exit 0
fi
"/data9/bf1942/bfstart1"
throw that into the crontab and you are good to go...
also, for those of you who want to see bfstart1:
cd /data9/bf1942
su - wokka -c 'screen -dmS bf1942 /data9/bf1942/bf1942_lnxded'
if you have any questions or need help, let me know.
-----Original Message-----
From: DLinkOZ [mailto:dlinkoz at oesm.org]
Sent: Tuesday, February 04, 2003 4:52 PM
To: bf1942 at icculus.org
Subject: Re: [bf1942] does anyone have an working startscript?
The su has no function on starting (or not starting in this case) of
servers. It simply allows the server to launch under a non-root account
when the script is executed by root. As long as the loop is true, it
does
nothing. When a server crashes, the loop is broken (for lack of a
better
way to put it) and reruns. This is very helpful if you like to restart
your
server occassionally (I do it every 4 hours since the process will
sometimes
surge up to 50% at idle for some reason), you just cron a "killall
bf1942_lnxded".
----- Original Message -----
From: "Neil Brown" <neil at twistedsquare.com>
To: <bf1942 at icculus.org>
Sent: Tuesday, February 04, 2003 4:47 PM
Subject: RE: [bf1942] does anyone have an working startscript?
> At 04:39 PM 04/02/2003 -0600, you wrote:
>
> >What's stopping this from starting up a new instance of the server
every
5
> >seconds?
>
> I presume its that su will only return when the server has exited. So
this
> script is designed to start up a new server as soon as the old one
> quits/crashes (well, 5 seconds after)
>
>
>
> > > -----Original Message-----
> > > From: DLinkOZ [mailto:dlinkoz at oesm.org]
> > > Sent: Saturday, January 18, 2003 6:10 PM
> > > To: bf1942 at icculus.org
> > > Subject: Re: [bf1942] does anyone have an working startscript?
> > >
> > >
> > > Here's what I use (uses su to server account so root can load
> > > it at boot,
> > > and runs a loop for crashes):
> > >
> > >
> > > #!/bin/bash
> > >
> > > while true
> > > do
> > >
> > > cd /servers/bf-30plus
> > > su xanax -c './bf1942_lnxded'
> > >
> > > sleep 5
> > > done
> > >
>
More information about the Bf1942
mailing list