From fc800a4c09d282bb046b67116da748d90dcfa56a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 2 Nov 2025 07:44:29 +0000 Subject: Improve s6-svc; prepare for 2.14.0.0 --- doc/s6-svc.html | 77 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 30 deletions(-) (limited to 'doc/s6-svc.html') diff --git a/doc/s6-svc.html b/doc/s6-svc.html index de25dd0..0ade16c 100644 --- a/doc/s6-svc.html +++ b/doc/s6-svc.html @@ -28,14 +28,19 @@ knowing their PIDs, and without using horrible hacks such as .pid files.

Interface

-     s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -s signal | -abqhkti12pcyrPCK ] [ -oduDUxO ] servicedir
+     s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -s signal | -abqhkti12pcyrPCK ] [ -oduDUxO ] servicedirs...
 

s6-svc sends the given series of commands to the -s6-supervise process monitoring the -servicedir directory, then exits 0. It exits 111 if it cannot send -a command, or 100 if no s6-supervise process is running on servicedir. +s6-supervise processes monitoring the +servicedirs directories, then exits 0. +

+ +

+ If an error occurs, s6-svc prints an error message and keeps processing +servicedirs. It then exits with an error code corresponding to +the last directory in servicedir that caused an error.

Options

@@ -124,43 +129,54 @@ started or restarted and has notified readiness.
  • -K : send a SIGKILL to the process group of the supervised process
  • +

    Exit codes

    + +
    +
    0
    Success.
    +
    100
    Usage error.
    +
    102
    One of the arguments in servicedirs is not a +currently supervised service directory.
    +
    111
    System call failure. +
    +

    Usage examples

    -
     s6-svc -h /service/httpd 
    +
     s6-svc -h /run/service/httpd 

    - Send a SIGHUP to the process represented by the /service/httpd + Send a SIGHUP to the process represented by the /run/service/httpd service directory. Traditionally, this makes web servers reload their configuration file.

    -
     s6-svc -r /service/sshd 
    +
     s6-svc -r /run/service/sshd /run/service/httpd 

    Kill (and automatically restart, if the wanted state of the service is up) -the process represented by the /service/sshd service directory - -typically the sshd server. +the process represented by the /run/service/sshd service directory +— typically the sshd server — as well as the process represented +by the /run/service/httpd directory — typically the Web server.

    -
     s6-svc -wD -d /service/ftpd 
    +
     s6-svc -wD -d /run/service/ftpd 

    Take down the ftpd server and block until the process is down and the finish script has completed.

    -
     s6-svc -wU -T 5000 -u /service/ftpd 
    +
     s6-svc -wU -T 5000 -u /run/service/ftpd 

    Bring up the ftpd server and block until it has sent notification that it is ready. Exit 1 if it is still not ready after 5 seconds.

    -
     s6-svc -wR -t /service/ftpd 
    +
     s6-svc -twR /run/service/ftpd /run/service/gitd 

    - Send a SIGTERM to the ftpd server; wait for -s6-supervise to restart it, and block -until it has notified that it is ready to serve again. See the NOTES -section below for a caveat. + Send a SIGTERM to the ftpd server and the git server; wait for their +respective supervisors to restart them, and block +until they both have notified that they are ready to serve again. See the NOTES +section below.

    -
     s6-svc -a /service/httpd/log 
    +
     s6-svc -a /run/service/httpd/log 

    Send a SIGALRM to the logger process for the httpd server. If this logger process is s6-log, this triggers a log rotation. @@ -169,32 +185,33 @@ process is s6-log, this triggers a log rotation.

    Internals

    Notes

    -- cgit v1.3.1