Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

in /etc/init.d/

first daemon

# Provides:          first
# Required-Start:    $remote_fs $syslog

second daemon

# Provides:          second
# Required-Start:    $remote_fs $syslog first

Is this in Debian the correct way to specify the dependency of the second daemon upon the first being launched before?

share|improve this question
Version of Debian, init system in use please? – vonbrand Nov 15 '15 at 13:39

Yes. Your example is correct. Debian has documentation on this at https://wiki.debian.org/LSBInitScripts

Provides: boot_facility_1 [boot_facility_2...]

defines boot facilities provided by this init script such that when the script is run with the start argument, the specified boot facilities will be deemed present and hence other init scripts which require those boot facilities must be started at a later stage. Normally you should use the script name as boot facility (without .sh if the file name has such an ending) but one can in the exceptional case also use the name of the service(s) that the script replaces. Boot facilities provided by scripts must not start with '$'. (Virtual facility names listed below are defined outside the init.d scripts.) Facility names should be unique within the distribution, to avoid 'duplicate provides' errors when a package is installed.


Required-Start: boot_facility_1 [boot_facility_2...]

defines facilities that must be available to start the script. Consider using virtual facility names as described below if adequate. If no boot facility is specified it means that this script can be started just after the bootstrap without local filesystems mounted, nor system logger, etc.

share|improve this answer
Does it apply if one service is restarted? – Varun Lakkur Feb 18 '15 at 15:19

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.