From 50a00de6e4aa6337b17a179019ec7689a2cc6b6d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 15 Jun 2018 12:36:00 +0000 Subject: Down signal customization: add ./down-signal file and s6-svc -r --- doc/s6-svc.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'doc/s6-svc.html') diff --git a/doc/s6-svc.html b/doc/s6-svc.html index 22a4f68..c1e617f 100644 --- a/doc/s6-svc.html +++ b/doc/s6-svc.html @@ -28,7 +28,7 @@ knowing their PIDs, and without using horrible hacks such as .pid files.

Interface

-     s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -abqhkti12pcyoduxO ] servicedir
+     s6-svc [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -T timeout ] [ -abqhkti12pcyoduxOr ] servicedir
 

@@ -55,7 +55,10 @@ a command, or 100 if no s6-supervise process is running on servicedir.

  • -y : send a SIGWINCH to the supervised process
  • -o : once. Equivalent to "-uO".
  • -d : down. If the supervised process is up, send it -a SIGTERM and a SIGCONT. Do not restart it.
  • +a SIGTERM (by default) then a SIGCONT (to make sure even stopped processes +receive the signal aimed to kill them) and do not restart it. +The SIGTERM default can be changed by editing the ./down-signal +file in the service directory.
  • -u : up. If the supervised process is down, start it. Automatically restart it when it dies.
  • -x : exit. When the service is asked to be down and @@ -71,6 +74,11 @@ stdin, stdout and stderr redirected to /dev/null.
  • -O : mark the service to run once at most. iow: do not restart the supervised process when it dies. If it is down when the command is received, do not even start it.
  • +
  • -r : If the service is up, restart it, by sending it a +signal to kill it and letting s6-supervise +start it again. By default, the signal is a SIGTERM; this can be configured +via the ./down-signal file in the service +directory.
  • -T timeout : if the -wstate option has been given, -T specifies a timeout (in milliseconds) after which s6-svc will exit 1 with an error message if @@ -106,7 +114,7 @@ service directory. Traditionally, this makes web servers reload their configuration file.

    -
     s6-svc -t /service/sshd 
    +
     s6-svc -r /service/sshd 

    Kill (and automatically restart, if the wanted state of the service is up) the process represented by the /service/sshd service directory - -- cgit v1.3.1