diff options
Diffstat (limited to 'doc/service/user/goetia-shutdown.html')
| -rw-r--r-- | doc/service/user/goetia-shutdown.html | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/doc/service/user/goetia-shutdown.html b/doc/service/user/goetia-shutdown.html new file mode 100644 index 0000000..5652923 --- /dev/null +++ b/doc/service/user/goetia-shutdown.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>user goetia-shutdown</title> + <meta name="Description" content="Script to tear down a user supervision tree." /> + <meta name="Keywords" content="goetia s6 s6-rc shutdown user supervision tree" /> + </head> + <header> + <p> + <a href="//0x53.net/software/goetia/goetia-base">goetia-base</a> + <br /> + <a href="//0x53.net/software/goetia">goetia</a> + <br /> + <a href="//0x53.net/software">Software</a> + <br /> + <a href="//0x53.net">0x53.net</a> + </p> + </header> + <body> + <h1>The user goetia-shutdown service</h1> + <p> + The user goetia-shutdown service is used to tear down + <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision trees</a>. + Upon being started it: + <ul> + <li> + It reads the <code>USER</code> environment variable, + if it is empty it exits 100. + </li> + <li> + It reads the <code>USERTREE</code> environment variable, + If it is empty it exits 100. + </li> + <li> + It checks whether the subdirectory + <code>${USER}/${USERTREE}</code> + of the + <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a> + exists. If not, meaning no user supervision tree is running, it exits 0. + </li> + <li> + It makes all of its stdout and stderr go to the + <a href="//0x53.net/software/goetia/goetia-base/service/user/s6-svscan-log.html">s6-svscan-log</a> + of the user supervision tree. + </li> + <li> + It stops all services managed by + <a href="https://skarnet.org/software/s6-rc/">s6-rc</a>. + </li> + <li> + It sends SIGHUP to s6-svscan-log of the user supervision tree. + This is important, since s6-svscan will keep the fifo open, + waiting for s6-svscan-log to exit, which in turn waits for + EOF before exiting itself. + SIGHUP tells s6-svscan-log to immediatly exit. + </li> + <li> + It tells + <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a> + to stop all remaining services and exit. + </li> + </ul> + </body> +</html> |
