Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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= 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?"

share|improve this question

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.

share|improve this answer

Third link on a google search for pure-ftp:

Mediatomb Documentation:

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.