Dinit
-----
-v0.05 (pre-release)
+v0.07 (pre-release)
What is it?
logfile = ...
options = ...
depends-on = (service name)
+depends-ms = (service name)
waits-for = (service name)
command = (external script or executable, and arguments)
the service does not reach the stopped state when the process terminates
unexpectedly).
+restart-delay = XXX.YYYY
+ Specifies the minimum time in seconds between automatic restarts. The
+ default is 0.2 (i.e. 200ms). This prevents Dinit from consuming processor
+ cycles when a process continuously fails immediately after it starts.
+
+restart-limit-interval = XXX.YYYY
+ Specifies the interval, in seconds, over which restarts are limited. If a
+ process automatically restarts more than a certain number of times (default
+ 3) in this time interval, it will not restart again. The default value is
+ 10 seconds. Use this to prevent broken services from continuously
+ restarting ad infinitum.
+
+restart-limit-count = NNN
+ Specifies the maximum number of times that a service can automatically
+ restart over the interval specified by restart-limit-interval (default of
+ 10 seconds). Specify a value of 0 to disable the restart limit.
+
+stop-timeout = XXX.YYYY (or XXX,YYYY)
+ Specifies the time in seconds allowed for the service to stop. If the
+ service takes longer than this, its process group is sent a SIGKILL signal
+ which should cause it to terminate immediately. The timeout period begins
+ only when all dependent services have already stopped. The default stop
+ timeout is 10 seconds.
+
+start-timeout = XXX.YYYY (or XXX,YYYY)
+ Specifies the time in seconds allowed for the service to start. IF the
+ service startup takes longer than this, its process group is sent a
+ SIGINT signal and transitions to the "stopping" state. if it fails to stop
+ within the period specified by the stop-timeout setting, it is sent a
+ SIGKILL signal.
+
pid-file = (path to file)
For "bgprocess" type services only; specifies the path of the file where
daemon will write its process ID before detaching.
executed until the named service has started. If the named service is
stopped then this service will also be stopped.
+depends-ms = (service name)
+ Indicates a "milestone dependency" on the named service. This service
+ requires the named service to start before it starts itself. Once the
+ named service has started, it remains active due to the dependency, but if
+ it stops for any reason then the dependency link is broken until the next
+ time this service is started.
+
waits-for = (service name)
When this service is started, wait for the named service to finish
starting (or to fail starting) before commencing the start procedure
receives the control socket must close it before launching any
untrusted processes. You should not use this option unless the
service is designed to receive a Dinit control socket.
+
+ start-interruptible : this service can have its startup interrupted
+ (cancelled) if it becomes inactive while still starting.
+ The SIGINT signal will be sent to the signal to cancel its
+ startup. This is meaningful only for scripted and bgprocess
+ services.
+
+logfile = (log file path)
+ Specifies the log file for the service. Output from the service process
+ will go this file.
Controlling services
(mysql). Services transitioning state (starting or stopping) are displayed
with an arrow indicating the transition direction:
- [ <<{-}] mysql # starting
- [{+}>> ] mysql # stopping
+ [{ }<< ] mysql # starting
+ [ >>{ }] mysql # stopping
+
+The curly brackets indicate the desired state, which may not be the state to
+which the service is currently transitioning. For example:
+
+ [ <<{ }] mysql # starting, but will stop after starting
+ [{ }>> ] mysql # stopping, but will restart once stopped
Remember that a "starting" service may be waiting for its dependencies to
start, and a "stopping" service may be waiting for its dependencies to stop.