Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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:

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.

share|improve this answer

Your Answer

 
discard

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.