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....
Ubuntu: service vs command line - where is CONF?
-
- Private First Class
- Posts: 5
- Joined: Mon Jan 13, 2014 3:58 pm
Re: Ubuntu: service vs command line - where is CONF?
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.
JeffM
-
- Private First Class
- Posts: 5
- Joined: Mon Jan 13, 2014 3:58 pm
Re: Ubuntu: service vs command line - where is CONF?
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....
/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....
Re: Ubuntu: service vs command line - where is CONF?
The wiki would be the best place to document it.
JeffM
Re: Ubuntu: service vs command line - where is CONF?
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