2

I'm curious as to what's the standard method of telling a startup script to execute with certain parameters.

For instance with MySQL, there's my.cnf, and from what I can tell, the startup parameters are derived by configuration options specified in my.cnf (i.e. --bind-address=127.0.0.1 corresponds to bind-address option in the my.cnf file and so on).

I always assumed that every daemon/service would have a configuration file in /etc/<some_app> and that these startup options are determined with it. However, I've ran into several daemon/services that I can't find where/how it determines what parameters to startup with. /etc/init.d/<some_script> usually has several conditionals and the usual defaults, but I'm not sure where these startup options are actually determined. Couple of examples are pure-ftpd and mediatomb; can't tell from the init.d script how the parameters are defined: the former has a conf/ sub-directory with files representing startup options (these seem to be a Debian/Ubuntu specific configuration method as the apt package installs the pure-ftpd-wrapper which references these conf files). With mediatomb, there's just a config.xml file.

I guess the question could be phrased as, "if you're looking to change startup options for a typical package-installed daemon/service application on a Debian-like system, where should you look?"

WuckaChucka
  • 375
  • 3
  • 8
  • 23

2 Answers2

1

For many services you would look in /etc/default/{service} a script fragment that allows you to insert/modify command line options for services that can't be configured by just modifying a configuration file.

This pattern is not followed by every service though. Sometimes you have to edit the /etc/init.d/{service} file directly.

One quick thing is to do a grep source for the /etc/init.d/{service} you are curious about. Most start scripts are using the dash or bash. The start up scripts frequently load the configuration from /etc/default/{service} or elsewhere by having a command like source /etc/default/{service} towards the top of the startup script.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
0

Third link on a google search for pure-ftp:

http://www.ubuntu-howto.info/howto/how-to-install-and-configure-pure-ftpd

Mediatomb Documentation:

http://mediatomb.cc/pages/documentation#id2856319

You should also consult the respective man pages for each package.

dmourati
  • 24,720
  • 2
  • 40
  • 69