Ubuntu: service vs command line - where is CONF?

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
wolfgangrumpf
Private First Class
Private First Class
Posts: 5
Joined: Mon Jan 13, 2014 3:58 pm

Ubuntu: service vs command line - where is CONF?

Post by wolfgangrumpf »

I installed the BZFS from the repositorys on Ubuntu. It created a service (so that I could do a "sudo service bzflag start") but the service wouldn't run.

Turns out it was a port conflict - I create a conf file with a different port specified, and when I run bzflag -conf from the command line (specifying the location of the modified conf file) the server runs just fine.

So here's my question - where does the service look for it's conf file? I want to be able to just use the service and modify the conf file for *that*, rather than having to run it from the command line....
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Ubuntu: service vs command line - where is CONF?

Post by JeffM »

You may want to ask the Ubuntu Games community as I believe they added that to the Ubuntu package. The BZFS server gets the config file location from the command line option -conf and then the path to the config file.
ImageJeffM
wolfgangrumpf
Private First Class
Private First Class
Posts: 5
Joined: Mon Jan 13, 2014 3:58 pm

Re: Ubuntu: service vs command line - where is CONF?

Post by wolfgangrumpf »

I got tired of waiting (LOL) so I did some digging. Turns out that on Ubuntu, the service has a default settings installed at:

/etc/default/bzflag

In that default file, at the end, is an OPTIONS block that passes a command line call to the executable when the service is started. I changed the default OPTION to -conf and passed it the location of my customized conf file (-conf /path/to/conf) and now the service starts up and uses my customized conf file.

There really is a dearth of good documentation as to how to make this work well on ubuntu! Hopefully this will solve at least some of that problem....
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Ubuntu: service vs command line - where is CONF?

Post by JeffM »

The wiki would be the best place to document it.
ImageJeffM
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Ubuntu: service vs command line - where is CONF?

Post by blast »

That init script was added by the Debian Games Team, which Ubuntu picked up. It was documented in /usr/share/doc/bzflag-server/README.Debian

Code: Select all

bzflag-server for Debian
----------------------

Since the bzflag server, bzfs, can be started from the bzflag client, it is not
started by default on Debian systems. To have init(8) start bzflag by default,
please change the value of the 'RUN_AT_STARTUP' flag in /etc/default/bzflag to
'yes'. You can customise this server by modifying the 'OPTIONS' flag in
/etc/default/bzflag. By default, we start a free-for-all server which does not
advertise itself on the bzflag server list.

 -- Ryan Kavanagh, Tue, 24 Jul 2012 09:05:14 -0400
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply