From ae3dcffce9a7898b7836c1e4399ff4806832eb3e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 15 Jan 2018 12:26:31 +0000 Subject: Doc update: systemd unit file example --- doc/s6-svscan-not-1.html | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) (limited to 'doc/s6-svscan-not-1.html') diff --git a/doc/s6-svscan-not-1.html b/doc/s6-svscan-not-1.html index f8e3496..13f00a9 100644 --- a/doc/s6-svscan-not-1.html +++ b/doc/s6-svscan-not-1.html @@ -58,8 +58,10 @@ initial logging service, that must read on the logging FIFO.

- In the following examples, we'll assume that /command/s6-svscanboot -is the name of the script you are using to start s6-svscan. Adjust this accordingly. + In some of the following examples, we'll assume that /command/s6-svscanboot +is the name of the script you are using to start s6-svscan. We will also assume +that all of the s6 executables are available through the /command path. +Adjust this accordingly.

@@ -86,7 +88,7 @@ for instance /etc/init/s6-svscan.conf, then start the service with start s6-svscan.

-

Example

+

Example

# s6-svscan
 start on runlevel [2345]
@@ -99,17 +101,40 @@ exec /command/s6-svscanboot
 
 
 

systemd

+

- systemd has -its -own way of supervising services. If you are a systemd user, chances -are you do not need s6. If you are interested in using s6, I encourage -you to also stop using systemd. + Put an appropriate unit file in the /etc/systemd/system folder, +for instance /etc/systemd/system/s6.service. It will be picked +up by systemd at boot time.

-

+

Example

+ +
[Unit]
+Description=s6 supervision tree
+Documentation=https://skarnet.org/software/s6/
 
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+ExecStart=/command/s6-svscan -St0 /service
+ExecStop=/command/s6-svscanctl -t /service
+ExecReload=/command/s6-svscanctl -an /service
+Restart=always
+RestartSec=1
+
+ +

+ Please note that, among other things, systemd performs process supervision, +so depending on the level of integration with your distribution that you +wish to achieve, you may be better off using systemd to directly manage +your daemons. Please also note that systemd is a +terrible piece of software engineering, and +if at all possible, you should try and switch to a distribution that does +not use it.

-- cgit v1.2.3