summaryrefslogtreecommitdiffstats
path: root/doc/bin
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-07 10:20:30 +0100
committerPS <p@0x53.net>2026-02-07 10:20:30 +0100
commit5e95d487982b9362b544139b98d1da55fa6ef78c (patch)
tree1abf6d91f9e6d0b6d0ac7b7d759663f2531eb51b /doc/bin
parentf7df2f7bb6abbea365cccb1345dcf1a1b7a80797 (diff)
downloadgoetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.gz
goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.tar.bz2
goetia-base-5e95d487982b9362b544139b98d1da55fa6ef78c.zip
Add doc
Diffstat (limited to 'doc/bin')
-rw-r--r--doc/bin/compile-db.html98
-rw-r--r--doc/bin/longrun-make.html141
-rw-r--r--doc/bin/oneshot-make.html101
-rw-r--r--doc/bin/prepare-svscan.html120
-rw-r--r--doc/bin/system-db.html67
-rw-r--r--doc/bin/system-ml.html96
-rw-r--r--doc/bin/system-rc.html63
-rw-r--r--doc/bin/system-run.html67
-rw-r--r--doc/bin/system-shutdown-daemon.html123
-rw-r--r--doc/bin/user-db.html82
-rw-r--r--doc/bin/user-init.html128
-rw-r--r--doc/bin/user-ml.html104
-rw-r--r--doc/bin/user-rc.html74
-rw-r--r--doc/bin/user-run.html78
-rw-r--r--doc/bin/user-shutdown.html68
-rw-r--r--doc/bin/user-tmpfs.html104
16 files changed, 1514 insertions, 0 deletions
diff --git a/doc/bin/compile-db.html b/doc/bin/compile-db.html
new file mode 100644
index 0000000..c0ed957
--- /dev/null
+++ b/doc/bin/compile-db.html
@@ -0,0 +1,98 @@
+<!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>compile-db</title>
+ <meta name="Description" content="A helper script for compiling s6-rc databases." />
+ <meta name="Keywords" content="goetia s6-rc s6-rc-compile source directory" />
+ </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 compile-db program</h1>
+ <p>
+ compile-db is a helper script for use by other software
+ that compiles a general <code><em>confdir</em></code>
+ tries to use the result to update a general
+ <code><em>livedir</em></code>.
+ </p>
+ <h2>Interface</h2>
+ <pre> compile-db <em>confdir</em> <em>livedir</em></pre>
+ <ul>
+ <li>
+ compile-db runs
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html">s6-rc-compile</a>
+ on <code><em>confdir</em>/src/*</code>.
+ </li>
+ <li>
+ This creates a new <code><em>confdir</em>/<var>@xyz@</var>_db</code>
+ file with <code><var>@xyz@</var></code> based on the current UNIX time.
+ </li>
+ <li>
+ If <code><em>livedir</em></code> exists, that is,
+ a goetia based supervision tree is running,
+ compile-db the tries to update the live state at <code><em>livedir</em></code>
+ to <code><var>@xyz@</var>_db</code> using
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-update.html">s6-rc-update</a>.
+ </li>
+ <li>
+ If it succeeds, it updates the symlink
+ <code><em>confdir</em>/compiled</code>
+ to point to
+ <code><em>confdir</em>/<var>@xyz@</var>_db</code>
+ and deletes the old database
+ <code><em>confdir</em>/<var>@abc@</var>_db</code>.
+ </li>
+ <li>
+ If it does <em>not</em> succeed,
+ it runs s6-rc-update to switch back to
+ <code><em>confdir</em>/compiled</code>
+ which points to
+ <code><em>confdir</em>/<var>@abc@</var>_db</code>.
+ Followed by deleting
+ <code><em>confdir</em>/<var>@xyz@</var>_db</code>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 0: success
+ </li>
+ <li>
+ Since compile-db is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ compile-db mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to compile-db.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/longrun-make.html b/doc/bin/longrun-make.html
new file mode 100644
index 0000000..0c5d8c4
--- /dev/null
+++ b/doc/bin/longrun-make.html
@@ -0,0 +1,141 @@
+<!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>longrun-make</title>
+ <meta name="Description" content="Helper script to generate s6-rc longrun source directories from a commandline." />
+ <meta name="Keywords" content="goetia s6-rc longrun source directory" />
+ </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 longrun-make program</h1>
+ <p>
+ longrun-make contains boilerplate code
+ required to create the
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directory</a>
+ of a longrun service
+ based on strings.
+ </p>
+ <h2>Interface</h2>
+ <pre> longrun-make <em>workingdir</em> <em>name</em> <em>type</em> <em>script</em> <em>dependencies</em></pre>
+ <ul>
+ <li>
+ <code><em>type</em></code> can only be one of <code>log | srv</code>.
+ </li>
+ <li>
+ <code><em>dependencies</em></code> can only be one of <code>"dependency1 dependency2 ..." | none</code>.
+ </li>
+ <li>
+ longrun-make creates the directory <code><em>workingdir</em>/<em>name</em>-<em>type</em></code>.
+ </li>
+ <li>
+ It creates the file <code><em>workingdir</em>/<em>name</em>-<em>type</em>/type</code>
+ (literal "<code>type</code>") and writes the line <code>longrun</code> to it.
+ </li>
+ <li>
+ It creates the file <code><em>workingdir</em>/<em>name</em>-<em>type</em>/notification-fd</code>
+ and writes the line <code>3</code> to it.
+ </li>
+ <li>
+ It creates the file <code><em>workingdir</em>/<em>name</em>-<em>type</em>/run</code>
+ and writes <code><em>script</em></code> to it.
+ </li>
+ <li>
+ If <code><em>type</em></code> is <code>log</code> <em>and</em> the file
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/consumer-for</code>
+ does <em>not</em> contain the string <code><em>name</em></code>:
+ <ul>
+ <li>
+ longrun-make aquires a lock on the file
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/consumer-for</code>
+ using
+ <a href="https://skarnet.org/software/s6/s6-setlock.html">s6-setlock</a>.
+ </li>
+ <li>
+ It appends the string <code><em>name</em>-srv</code> to the file
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/consumer-for</code>
+ creating it if it does not exist.
+ </li>
+ <li>
+ It creates a file <code><em>workingdir</em>/<em>name</em>-<em>type</em>/pipeline-name</code>,
+ truncating it if it does exist and adds the string <code><em>name</em></code>.
+ </li>
+ </ul>
+ </li>
+ <li>
+ If <code><em>type</em></code> is <code>srv</code>:
+ <ul>
+ <li>
+ The file
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/producer-for</code>
+ is created, truncated and the string <code><em>name</em>-log</code> is added.
+ </li>
+ </ul>
+ </li>
+ <li>
+ If <code><em>dependencies</em></code> is not <code>none</code>:
+ <ul>
+ <li>
+ The directory
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/dependencies.d</code>
+ is created.
+ </li>
+ <li>
+ For each word <code>"dependency1 dependency2 ..."</code> in
+ <code><em>dependencies</em></code> separated by spaces,
+ a file
+ <code><em>workingdir</em>/<em>name</em>-<em>type</em>/dependencies.d/<em>dependency</em></code>
+ is created.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>
+ longrun-make is, by means of locking and checking for duplicates,
+ specifically designed to allow parallel creation of logging
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>.
+ </p>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 0: success
+ </li>
+ <li>
+ Since longrun-make is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ longrun-make mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to longrun-make.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/oneshot-make.html b/doc/bin/oneshot-make.html
new file mode 100644
index 0000000..1b285c6
--- /dev/null
+++ b/doc/bin/oneshot-make.html
@@ -0,0 +1,101 @@
+<!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>oneshot-make</title>
+ <meta name="Description" content="Helper script to generate s6-rc oneshot source directories from a commandline." />
+ <meta name="Keywords" content="goetia s6-rc oneshot source directory" />
+ </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 oneshot-make program</h1>
+ <p>
+ oneshot-make contains boilerplate code
+ required to create the
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directory</a>
+ of a oneshot service
+ based on strings.
+ </p>
+ <h2>Interface</h2>
+ <pre> oneshot-make <em>workingdir</em> <em>name</em> <em>upscript</em> <em>downscript</em> <em>dependencies</em></pre>
+ <ul>
+ <li>
+ <code><em>dependencies</em></code> can only be one of <code>"dependency1 dependency2 ..." | none</code>.
+ </li>
+ <li>
+ oneshot-make creates the directory <code><em>workingdir</em>/<em>name</em></code>
+ </li>
+ <li>
+ it creates the file <code><em>workingdir</em>/<em>name</em>/type</code>
+ and writes the line <code>oneshot</code> to it.
+ </li>
+ <li>
+ it creates the file <code><em>workingdir</em>/<em>name</em>/up</code>
+ and writes <code><em>upscript</em></code> to it.
+ </li>
+ <li>
+ it creates the file <code><em>workingdir</em>/<em>name</em>/down</code>
+ and writes <code><em>downscript</em></code> to it.
+ </li>
+ <li>
+ If <code><em>dependencies</em></code> is not <code>none</code>:
+ <ul>
+ <li>
+ The directory
+ <code><em>workingdir</em>/<em>name</em>/dependencies.d</code>
+ is created.
+ </li>
+ <li>
+ For each word <code>"dependency1 dependency2 ..."</code> in
+ <code><em>dependencies</em></code> separated by spaces,
+ a file
+ <code><em>workingdir</em>/<em>name</em>/dependencies.d/<em>dependency</em></code>
+ is created.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 0: success
+ </li>
+ <li>
+ Since oneshot-make is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ oneshot-make mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to oneshot-make.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/prepare-svscan.html b/doc/bin/prepare-svscan.html
new file mode 100644
index 0000000..6b82bd5
--- /dev/null
+++ b/doc/bin/prepare-svscan.html
@@ -0,0 +1,120 @@
+<!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>prepare-svscan</title>
+ <meta name="Description" content="Helper script to initialize a supervision tree." />
+ <meta name="Keywords" content="goetia s6 s6-rc 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 prepare-svscan program</h1>
+ <p>
+ prepare-svscan does generic preparation of the
+ <a href="//0x53.net/software/goetia/supervisiontree.html">supervision tree</a>.
+ It is also used in system-init and
+ <a href="./user-init.html">user-init</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> prepare-svscan <em>workingdir</em> <em>rundir</em> <em>bundle</em> <em>prog...</em></pre>
+ <ul>
+ <li>
+ prepare-svscan sets its standard input to <code>/dev/null</code>.
+ </li>
+ <li>
+ It sets the umask to <code>0022</code>.
+ </li>
+ <li>
+ It creates the directory <code><em>rundir</em></code>.
+ </li>
+ <li>
+ It copies all contents of <code><em>workingdir</em>/run-image/.</code>
+ to <code><em>rundir</em>/</code>.
+ </li>
+ <li>
+ It changes its standard output to <code><em>rundir</em>/service/s6-svscan-log/fifo</code>.
+ </li>
+ <li>
+ prepare-svscan then forks a background process that:
+ <ul>
+ <li>
+ waits for a reading end at <code><em>rundir</em>/service/s6-svscan-log/fifo</code>.
+ </li>
+ <li>
+ Once the above is given, if <code><em>rundir</em>/s6-rc</code> does <em>not</em> exist,
+ </li>
+ <li>
+ it initiates <a href="https://skarnet.org/software/s6-rc/">s6-rc</a> on
+ <code><em>rundir</em>/service</code> using
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-init.html">s6-rc-init</a>
+ and starts the bundle <code><em>bundle</em></code> using s6-rc.
+ </li>
+ </ul>
+ </li>
+ <li>
+ It copies stderr to stdout.
+ </li>
+ <li>
+ If available, the directory <code><em>workingdir</em>/env</code> is sourced using
+ <a href="https://skarnet.org/software/s6/s6-envdir.html">s6-env</a>.
+ </li>
+ <li>
+ prepare-svscan executest into <code><em>prog...</em></code>,
+ which is usually directly or indirectly
+ <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a>.
+ </li>
+ </ul>
+ <p>
+ Once s6-svscan is launched it will start an
+ <a href="https://skarnet.org/software/s6/s6-supervise.html">s6-supervise</a>
+ process on <code><em>rundir</em>/service/s6-svscan-log</code> which starts
+ <a href="https://skarnet.org/software/s6/s6-log.html">s6-log</a> reading
+ from <code><em>rundir</em>/service/s6-svscan-log/fifo</code>.
+ This in turn triggers the forked background process to continue with its second step.
+ </p>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ prepare-svscan usually executes into
+ <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a>
+ which exits according to its page.
+ </li>
+ <li>
+ Since prepare-svscan is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ prepare-svscan mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to prepare-svscan.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/system-db.html b/doc/bin/system-db.html
new file mode 100644
index 0000000..056f5b7
--- /dev/null
+++ b/doc/bin/system-db.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>system-db</title>
+ <meta name="Description" content="Script to compile the system supervision tree database." />
+ <meta name="Keywords" content="goetia compile-db s6-rc s6-rc-compile system 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 system-db program</h1>
+ <p>
+ system-db compiles the
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
+ of the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>
+ into the <em>compiled</em> format.
+ This format can then be used by init and
+ <a href="./system-rc.html">system-rc</a>
+ to set up and control a
+ <a href="//0x53.net/software/goetia/supervisiontree.html#system">system supervision tree</a>.
+ </p>
+ <p>
+ system-db is a wrapper around the more general
+ <a href="./compile-db.html">compile-db</a>
+ making it target the system supervision tree.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-db</pre>
+ <ul>
+ <li>
+ system-db takes no arguments.
+ </li>
+ <li>
+ It runs compile-db supplementing it with the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>
+ and
+ <a href="//0x53.net/software/goetia/rundir.html#system">system runtime directory</a>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ Since system-db is a wrapper around compile-db, it
+ <a href="./compile-db.html">behaves exactly like it</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to system-db.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/system-ml.html b/doc/bin/system-ml.html
new file mode 100644
index 0000000..bc487a9
--- /dev/null
+++ b/doc/bin/system-ml.html
@@ -0,0 +1,96 @@
+<!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>system-ml</title>
+ <meta name="Description" content="Script to autogenerate loggers for the system supervision tree." />
+ <meta name="Keywords" content="goetia longrun-make s6-rc logger log system 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 system-ml program</h1>
+ <p>
+ system-ml automatically creates logging service
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
+ for longrun services in the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>.
+ To create the logging service source directories,
+ system-ml uses
+ <a href="./longrun-make.html">longrun-make</a> internally.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-ml</pre>
+ <ul>
+ <li>
+ system-ml takes no arguments.
+ </li>
+ <li>
+ It deletes the <code>src/generated-logger</code> subdirectory of the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>.
+ </li>
+ <li>
+ It scans the <code>src</code> subdirecotry of the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>
+ for longrun services.
+ </li>
+ <li>
+ It checks for each longrun it detects,
+ whether its source directory contains a file <code>no-ml</code>.
+ If this file exits, this longrun is skipped in the subsequent logger generation.
+ </li>
+ <li>
+ It generates a logging service source directory at
+ <code>src/generated-logger/<var>@longrun@</var>-log</code>
+ in the <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>.
+ It does so in parallel for each longrun <code><var>@longrun@</var>-srv</code> it found.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ Since system-ml is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ system-ml mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to system-ml.
+ </li>
+ </ul>
+ <h2>Notes</h2>
+ <p>
+ The logger services created by this script
+ will drop privileges to
+ <code><var>@loguser@</var></code>,
+ which must exist at runtime.
+ (see <a href="//0x53.net/software/goetia/logdir.html">log directory</a>).
+ </p>
+ </body>
+</html>
diff --git a/doc/bin/system-rc.html b/doc/bin/system-rc.html
new file mode 100644
index 0000000..f6e48db
--- /dev/null
+++ b/doc/bin/system-rc.html
@@ -0,0 +1,63 @@
+<!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>system-rc</title>
+ <meta name="Description" content="Convenience wrapper around s6-rc to control the system supervision tree." />
+ <meta name="Keywords" content="goetia s6-rc system 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 system-rc program</h1>
+ <p>
+ system-rc is a thin convenience wrapper around
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ doing nothing more then pointing it to the right livedir.
+ </p>
+ <p>
+ Read the page of
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ to understand what this utility does.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-rc ... <a href="https://skarnet.org/software/s6-rc/s6-rc.html">see s6-rc</a> ...</pre>
+ <ul>
+ <li>
+ It runs
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ with the appropriate livedir option.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ Since system-rc is a thin wrapper around
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ it behaves almost exactly like it.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ system-rc takes exactly the same options as
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/system-run.html b/doc/bin/system-run.html
new file mode 100644
index 0000000..465cee4
--- /dev/null
+++ b/doc/bin/system-run.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>system-run</title>
+ <meta name="Description" content="Run little scripts from the system supervision tree, providing reliability." />
+ <meta name="Keywords" content="goetia s6 system 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 system-run program</h1>
+ <p>
+ system-run allows
+ to hand over the execution of commands to the
+ <a href="//0x53.net/software/goetia/supervisiontree.html#system">system supervision tree</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-run <em>prog...</em></pre>
+ <ul>
+ <li>
+ Internally, system-run invokes
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>
+ to connect to an
+ <a href="https://skarnet.org/software/s6/s6-sudod.html">s6-sudod</a>
+ instance provided by the system
+ <a href="//0x53.net/software/goetia/service/system/goetia-runner.html">goetia-runner</a>.
+ </li>
+ <li>
+ <code><em>prog...</em></code> is then transferred
+ to and executed by goetia-runner.
+ </li>
+ <li>
+ See
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>
+ and
+ <a href="https://skarnet.org/software/s6/s6-sudod.html">s6-sudod</a>
+ for configuration options and detailed information.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ system-run behaves exactly as
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ system-run takes the exact same options as
+ <a href="https://skarnet.org/software/s6/s6-sudoc.html">s6-sudoc</a>.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/system-shutdown-daemon.html b/doc/bin/system-shutdown-daemon.html
new file mode 100644
index 0000000..82493b6
--- /dev/null
+++ b/doc/bin/system-shutdown-daemon.html
@@ -0,0 +1,123 @@
+<!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>system-shutdown-daemon</title>
+ <meta name="Description" content="The kernel indepentent part of the goetia shutdown procedure." />
+ <meta name="Keywords" content="goetia s6 s6-rc system supervision tree shutdown" />
+ </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 system-shutdown-daemon program</h1>
+ <p>
+ system-shutdown-daemon contains the Kernel independent
+ part of the shutdown sequence.
+ It is invoked by the Kernel specifict goetia-shutdown service,
+ e.g.
+ <a href="//0x53.net/software/goetia/goetia-linux-init/service/system/goetia-shutdown.html">goetia-shutdown service for Linux</a>
+ or
+ <a href="//0x53.net/software/goetia/goetia-freebsd-init/service/system/goetia-shutdown.html">goetia-shutdown service for FreeBSD</a>.
+ system-shutdown-daemon is a long lived program that waits for instruction by the system-shutdown command
+ The latter is part of the Kernel specific packages, e.g.
+ <a href="//0x53.net/software/goetia/goetia-linux">goetia-linux</a>
+ or
+ <a href="//0x53.net/software/goetia/goetia-freebsd">goetia-freebsd</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-shutdown-daemon</pre>
+ <ul>
+ <li>
+ system-shutdown-daemon takes no arguments.
+ </li>
+ <li>
+ It tries to execute <code>./stage3b</code>,
+ which is by default not executable.
+ If it can not execute <code>./stage3b</code>,
+ and <em>only</em> in this case,
+ it continues with the following.
+ </li>
+ <li>
+ All services managed by
+ <a href="https://skarnet.org/software/s6-rc/">s6-rc</a>
+ are stopped.
+ This means, all services defined in
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
+ at the <code>src</code> subdirectory of the
+ <a href="//0x53.net/software/goetia/confdir.html#system">system configuration directory</a>.
+ </li>
+ <li>
+ Next, all leftover services <em>except</em>
+ s6-svscan-log, goetia-shutdown and goetia-rescue, are stopped.
+ </li>
+ <li>
+ The file <code>stage3b</code>, expected to exist in the current working directory
+ is made executable.
+ This file is part of the Kernel secific service directories.
+ (see e.g. <a href="//0x53.net/software/goetia/goetia-linux-init/service/system/goetia-shutdown.html">goetia-shutdown</a>)
+ </li>
+ <li>
+ all uncaught system logs are copied from the
+ <code>log/uncaught-logs</code>
+ subdirectory of the
+ <a href="//0x53.net/software/goetia/rundir.html#system">system runtime directory</a>.
+ to the
+ <code>uncaught-logs</code>
+ subdirectory of the
+ <a href="//0x53.net/software/goetia/logdir.html#">system log directory</a>.
+ </li>
+ <li>
+ SIGTERM is sent to all processes but PID 1.
+ </li>
+ <li>
+ This also stops the system-shutdown-daemon process.
+ It is automatically restarted by the system supervision tree,
+ but this time, the file <code>./stage3b</code> is executable
+ and executed instead of what is described above.
+ What happens in <code>./stage3b</code> is Kernel specific,
+ and documented on
+ <a href="//0x53.net/software/goetia/goetia-linux-init/service/goetia-shutdown.html">goetia-shutdown service for Linux</a>,
+ <a href="//0x53.net/software/goetia/goetia-freebsd-init/service/goetia-shutdown.html">goetia-shutdown service for FreeBSD</a>,
+ etc.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ Since system-shutdown-daemon is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ system-shutdown-daemon mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to system-shutdown-daemon.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-db.html b/doc/bin/user-db.html
new file mode 100644
index 0000000..26ef310
--- /dev/null
+++ b/doc/bin/user-db.html
@@ -0,0 +1,82 @@
+<!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-db</title>
+ <meta name="Description" content="Script to compile the user supervision tree database." />
+ <meta name="Keywords" content="goetia compile-db s6-rc 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-db program</h1>
+ <p>
+ user-db compiles the
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
+ of the
+ <a href="//0x53.net/software/goetia/confdir.html#user">user configuration directory</a>
+ into the <em>compiled</em> format.
+ This format can then be used by init and
+ <a href="./user-rc.html">user-rc</a>
+ to set up and control a
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a>.
+ </p>
+ <p>
+ user-db is a wrapper around the more general
+ <a href="./compile-db.html">compile-db</a>
+ making it target the user supervision tree.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-db</pre>
+ <ul>
+ <li>
+ user-db takes no arguments.
+ </li>
+ <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 reads the <code>HOME</code> environment variable,
+ if it is empty it exits 100.
+ </li>
+ <li>
+ It runs compile-db supplementing it the correct
+ <a href="//0x53.net/software/goetia/confdir.html#user">user configuration directory</a>
+ and
+ <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ Since user-db is a wrapper around compile-db, it
+ <a href="./compile-db.html">behaves exactly like it</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to user-db.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-init.html b/doc/bin/user-init.html
new file mode 100644
index 0000000..c96c3ae
--- /dev/null
+++ b/doc/bin/user-init.html
@@ -0,0 +1,128 @@
+<!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-init</title>
+ <meta name="Description" content="Script to initialize a user supervision tree." />
+ <meta name="Keywords" content="goetia prepare-svscan s6 s6-rc 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-init program</h1>
+ <p>
+ user-init starts a user supervision tree for
+ the user defined in the <code>USER</code>
+ environment variable.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-init</pre>
+ <ul>
+ <li>
+ user-init takes no arguments.
+ </li>
+ <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 reads the <code>BUNDLE</code> environment variable,
+ defaulting to <code>default</code> if empty.
+ </li>
+ <li>
+ It reads the <code>PATH</code> environment variable,
+ defaulting to
+ <code>/command:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/libexec:/usr/local/libexec</code>
+ if empty.
+ </li>
+ <li>
+ if <code>${USER}/${USERTREE}</code> subdirectory of the
+ <a href="//0x53.net/software/goetia/rundir.html">runtime directory</a>
+ olready existis, it exits 100.
+ </li>
+ <li>
+ It sets the <code>HOME</code> environment variable based on the result of
+ <a href="https://skarnet.org/software/execline/homeof.html">homeof</a>.
+ </li>
+ <li>
+ It prepends <code>${HOME}/.local/bin:</code> to the <code>PATH</code>
+ environment variable.
+ </li>
+ <li>
+ It sets the <code>UID</code>, <code>GID</code> and <code>GIDLIST</code>
+ environment variables using
+ <a href="https://skarnet.org/software/s6/s6-envuidgid.html">s6-envuidgid</a>.
+ </li>
+ <li>
+ It runs
+ <code><a href="./prepare-svscan.html">prepare-svscan</a></code>
+ with the proper arguments.
+ </li>
+ <li>
+ Finally, it executes into
+ <code><a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a></code>
+ on the scandir represented by the
+ <code>${USER}/${USERTREE}/service</code>
+ subdirectory of the
+ <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ user-init usually executes into
+ <a href="https://skarnet.org/software/s6/s6-svscan.html">s6-svscan</a>
+ which exits according to its documentation.
+ </li>
+ <li>
+ Since user-init is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ user-init mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective documentation.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to user-init.
+ </li>
+ </ul>
+ <h2>Notes</h2>
+ <p>
+ More information about user supervision trees
+ themselves can be found on the
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a>
+ page.
+ </p>
+ </body>
+</html>
diff --git a/doc/bin/user-ml.html b/doc/bin/user-ml.html
new file mode 100644
index 0000000..d6d7e2e
--- /dev/null
+++ b/doc/bin/user-ml.html
@@ -0,0 +1,104 @@
+<!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-ml</title>
+ <meta name="Description" content="Script to autogenerate loggers for the user supervision tree." />
+ <meta name="Description" content="A policy for s6 and s6-rc" />
+ <meta name="Keywords" content="goetia longrun-make s6-rc logger log 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-ml program</h1>
+ <p>
+ user-ml automatically creates logging service
+ <a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
+ for longrun services of the
+ <a href="//0x53.net/software/goetia/confdir.html#user">user configuration directory</a>.
+ To create the logging service source directories,
+ user-ml uses
+ <a href="./longrun-make.html">longrun-make</a> internally.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-ml</pre>
+ <ul>
+ <li>
+ user-ml takes no arguments.
+ </li>
+ <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 reads the <code>HOME</code> environment variable,
+ if it is empty it exits 100.
+ </li>
+ <li>
+ It deletes the <code>${USERTREE}/src/generated-logger</code> subdirectory
+ of the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>.
+ </li>
+ <li>
+ It scans the <code>${USERTREE}/src</code> subdirectory
+ of the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>
+ for longrun services.
+ </li>
+ <li>
+ It checks for each longrun it detects,
+ whether its source directory contains a file <code>no-ml</code>.
+ If this file exits, this longrun is skipped in the subsequent logger generation.
+ </li>
+ <li>
+ It generates a logging service source directory
+ <code>${USERTREE}/src/generated-logger/<var>@longrun@</var>-log</code>
+ in parallel for each longrun <code><var>@longrun@</var>-srv</code> it found
+ in the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ Since user-ml is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ user-ml mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to user-ml.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-rc.html b/doc/bin/user-rc.html
new file mode 100644
index 0000000..3bad0c5
--- /dev/null
+++ b/doc/bin/user-rc.html
@@ -0,0 +1,74 @@
+<!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-rc</title>
+ <meta name="Description" content="Convenience wrapper around s6-rc to control the user supervision tree." />
+ <meta name="Keywords" content="goetia s6-rc 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-rc program</h1>
+ <p>
+ The user-rc program is a thin convenience wrapper around
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ doing nothing more then pointing it to the right livedir.
+ </p>
+ <p>
+ Read the page of
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ to understand what this utility does.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-rc ... <a href="https://skarnet.org/software/s6-rc/s6-rc.html">see s6-rc</a> ...</pre>
+ <ul>
+ <li>
+ user-rc 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 runs
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ with the appropriate livedir option.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ Since user-rc is a thin wrapper around
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>
+ it behaves almost exactly like it.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ user-rc takes exactly the same options as
+ <a href="https://skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-run.html b/doc/bin/user-run.html
new file mode 100644
index 0000000..924849c
--- /dev/null
+++ b/doc/bin/user-run.html
@@ -0,0 +1,78 @@
+<!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-run</title>
+ <meta name="Description" content="Run little scripts from the user supervision tree, providing reliability." />
+ <meta name="Keywords" content="goetia s6 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-run program</h1>
+ <p>
+ The user-run program allows
+ to hand over the execution of commands to the
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-run <em>prog...</em></pre>
+ <ul>
+ <li>
+ user-rc 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>
+ Internally, user-run invokes
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>
+ to connect to an
+ <a href="https://skarnet.org/software/s6/s6-sudod.html">s6-sudod</a>
+ instance provided by the user
+ <a href="//0x53.net/software/goetia/service/user/goetia-runner.html">goetia-runner</a>.
+ </li>
+ <li>
+ <code><em>prog...</em></code> is then transferred
+ to and executed by goetia-runner.
+ </li>
+ <li>
+ See
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>
+ and
+ <a href="https://skarnet.org/software/s6/s6-sudod.html">s6-sudod</a>
+ for configuration options and detailed information.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ user-run behaves exactly as
+ <a href="https://skarnet.org/software/s6/s6-sudo.html">s6-sudo</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ user-run takes the exact same options as
+ <a href="https://skarnet.org/software/s6/s6-sudoc.html">s6-sudoc</a>.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-shutdown.html b/doc/bin/user-shutdown.html
new file mode 100644
index 0000000..6a52db8
--- /dev/null
+++ b/doc/bin/user-shutdown.html
@@ -0,0 +1,68 @@
+<!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-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-shutdown program</h1>
+ <p>
+ The user-shutdown program is used to tear down
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision trees</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-shutdown</pre>
+ <ul>
+ <li>
+ user-shutdown takes no arguments.
+ </li>
+ <li>
+ It starts the user
+ <a href="//0x53.net/software/goetia/goetia-base/service/user/goetia-shutdown.html">goetia-shutdown</a>
+ service.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ Since user-shutdown is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ user-shutdown mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective pages.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no options to user-shutdown.
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/doc/bin/user-tmpfs.html b/doc/bin/user-tmpfs.html
new file mode 100644
index 0000000..3c22c57
--- /dev/null
+++ b/doc/bin/user-tmpfs.html
@@ -0,0 +1,104 @@
+<!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-tmpfs</title>
+ <meta name="Description" content="Script to prepare a user owned tmpfs to house a user supervision tree." />
+ <meta name="Keywords" content="goetia tmpfs 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-tmpfs program</h1>
+ <p>
+ The user-tmpfs program prepares
+ a user owned tmpfs for
+ the user defined in the <code>USER</code>
+ environment variable.
+ The user owned tmpfs is created at
+ <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </p>
+ <h2>Interface</h2>
+ <pre> user-tmpfs</pre>
+ <ul>
+ <li>
+ user-tmpfs takes no arguments.
+ </li>
+ <li>
+ It reads the <code>USER</code> environment variable,
+ if it is empty it exits 100.
+ </li>
+ <li>
+ It reads the <code>USER_TMPFSDIR_SIZE</code> environment variable,
+ defaulting to <code>64m</code> if undefined.
+ </li>
+ <li>
+ It creates the directory
+ <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </li>
+ <li>
+ It mounts a tmpfs
+ of size <code>USER_TMPFSDIR_SIZE</code>
+ with its root owned bi <code>USER</code>
+ and mode <code>0755</code>
+ at <code><var>@tmpfsdir@</var>/<var>@usrrundir@</var>/<var>${USER}</var></code>.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ 100 if a critical environment variable is missing.
+ </li>
+ <li>
+ Since user-tmpfs is an
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ script, it exits with an approximation
+ of employed program that failed.
+ </li>
+ <li>
+ user-tmpfs mostly uses
+ <a href="https://skarnet.org/software/execline/">execline</a>
+ and
+ <a href="https://skarnet.org/software/s6/">s6</a>
+ software, the exit behaviour of which can be looked up on
+ their respective documentation.
+ </li>
+ <li>
+ See also:
+ <a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ There are no otions to user-tmpfs.
+ </li>
+ </ul>
+ <h2>Notes</h2>
+ <p>
+ user-tmpfs is intended to be used in a boot time
+ <a href="//0x53.net/software/goetia/supervisiontree.html#system">system supervision tree</a>
+ oneshot service to prepare the
+ <a href="//0x53.net/software/goetia/rundir.html#user">user runtime directory</a>
+ of a user.
+ For each user who should have a user runtime directory,
+ there should be a distinct oneshot running user-tmpfs.
+ </p>
+ <p>
+ Alternatively, user-tmpfs could be run by a login manager
+ after login, but befor initiating the first
+ <a href="//0x53.net/software/goetia/supervisiontree.html#user">user supervision tree</a>.
+ </p>
+ </body>
+</html>