The s6-svc program

s6-svc sends commands to a running s6-supervise process. In other words, it's used to control a supervised process; among other benefits, it allows an administrator to send signals to daemons without knowing their PIDs, and without using horrible hacks such as .pid files.


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

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.


Usage examples

 s6-svc -h /service/httpd 

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

 s6-svc -t /service/sshd 

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.

 s6-svc -wD -d /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 

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 

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.

 s6-svc -a /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.