autostart bzflag

All things BZFlag - no [OT] here please
Post Reply
Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

autostart bzflag

Post by 1veedo » Mon Mar 14, 2005 10:30 pm

Is there any way I can start bzflag, in a consol (not in the background), and contain paramaters as well: like -world and -conf.

Code: Select all

[root@localhost ~]# chkconfig "bzfs -world /home/azevedo/map/dogfight/AerialDogfight.bzw -conf /home/azevedo/bzfs/conf -d -d -d" on
error reading information on service bzfs -world /home/azevedo/map/dogfight/AerialDogfight.bzw -conf /home/azevedo/bzfs/conf -d -d -d: No such file or directory
Of course, that didnt work. :wink:
1veedo ( I have version 3!

User avatar
Private First Class
Private First Class
Posts: 127
Joined: Sun Dec 26, 2004 4:33 am
Location: Good ol' California

Post by wegstar » Tue Mar 15, 2005 3:10 am

you mean bzfs ;)
Try this err...:

Code: Select all

"bzfs" -world /home/azevedo/map/dogfight/AerialDogfight.bzw -conf /home/azevedo/bzfs/conf -d -d -d 
Formerly "nader"
Microsoft broke Volkswagen's world record: Volkswagen only made 22 million bugs!
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Private First Class
Private First Class
Posts: 184
Joined: Sat Feb 05, 2005 1:26 am
Location: usa

Post by 1veedo » Thu Mar 24, 2005 1:24 am

Ok, I did some research but I'm a little weary.

I hear you can add scritps to

Code: Select all

in this manner:

Code: Select all


I dont know if I want to try

/.../bzfs [commands]

Would that work? I'm also tryign to start a couple other music! I know that works though :wink:

I found a couple other folders designated to autostart, but I think the above id ideal?

PS, nader, putting quotes around something doesn't make it autostart. chkconfig is used to autostart services like web, ftp, mail etc on startup. I was hopping there was another command that would let me run standard scripts instead of actual services. Config files are starting to look more and more familiar to me though. So I'll just stick w/ what I've found so far.

Anybody know anything about autostarting apps? If I add a line after the script will KDE boot properly? I highly dobt a little syntax error on that level in the OS could really kill my computer but "rm -rf" has happeend to me in the past so I'm very skeptical when I dont know what I'm doing.

Of course, I never reboot my computer (it is Linux, right?) but it would still be cool. If somebody can confirm the above would work, I'm going to make XMMS start playing on boot. It would be the coolest rig I've ever put together.
1veedo ( I have version 3!

Tim Riker
Posts: 10
Joined: Thu Dec 02, 2004 5:33 pm
Location: USA, Utah, Salt Lake City


Post by Tim Riker » Thu Mar 24, 2005 7:21 pm

I use a crontab entry to do this:

Code: Select all

@reboot $HOME/bin/loopbzfs5153 </dev/null >/dev/null 2>/dev/null&
and then the script looks like this:

Code: Select all

#!/bin/sh -x
ulimit -c 1000000
ulimit -n 40
while [ -x $prog ] ; do
  time=`date '+%Y%m%d-%H:%M:%S'`
  exec < /dev/null >> $log 2>>$log
  set -x
  cd $serverdir
  # -publiclist bzflist:// -requireudp
  # -publiclist
  msg="($time) $worldfile - registration required - CVS build -"
  $prog \
	-conf bzfs.conf \
	-d -d -d \
	-i $host \
	-p $port \
	-public "$msg" \
	-publicaddr $host:$port \
	-srvmsg "$msg" \
	-world $world
  echo exit code: $?
  numlogs=`ls $logdir/bzfs${port}* | wc -l`
  dellogs=`expr $numlogs - $keeplogs`
  if [ $dellogs -gt 0 ] ; then
    rm `ls $logdir/bzfs${port}* | head -n $dellogs`
  sleep 5
If your cron daemon supports it, the "@reboot" entries get run at system startup.
Tim Riker - -
BZFlag maintainer - - for fun!

Post Reply