summaryrefslogtreecommitdiffstats
path: root/doc/bin/system-shutdown.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bin/system-shutdown.html')
-rw-r--r--doc/bin/system-shutdown.html88
1 files changed, 88 insertions, 0 deletions
diff --git a/doc/bin/system-shutdown.html b/doc/bin/system-shutdown.html
new file mode 100644
index 0000000..c20d0a1
--- /dev/null
+++ b/doc/bin/system-shutdown.html
@@ -0,0 +1,88 @@
+<!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</title>
+ <meta name="Description" content="Client side shutdown command responsible for starting the service responsible for actual shutdown." />
+ <meta name="Keywords" content="goetia s6 s6-rc FreeBSD shutdown" />
+ </head>
+ <header>
+ <p>
+ <a href="//0x53.net/software/goetia/goetia-freebsd-init">goetia-freebsd-init</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 program</h1>
+ <p>
+ system-shutdown is the interface to the
+ <a href="//0x53.net/software/goetia/goetia-base/bin/system-shutdown-daemon.html">system-shutdown-daemon</a>.
+ </p>
+ <h2>Interface</h2>
+ <pre> system-shutdown -h | -p | -r</pre>
+ <ul>
+ <li>
+ system-shutdown writes its argument to the file <code>DIRECTIVE</code> in the envdir at the
+ <code>shutdown-directive</code> subdirectory of the
+ <a href="//0x53.net/software/goetia/rundir.html#system">system runtime directory</a>.
+ </li>
+ <li>
+ It continues to initiate the shutdown sequence by starting the service
+ <a href="//0x53.net/software/goetia/goetia-freebsd-init/service/system/goetia-shutdown.html">goetia-shutdown</a>.
+ </li>
+ </ul>
+ <h2>Options</h2>
+ <ul>
+ <li>
+ <code>-h</code>: at the end of the shutdown sequence, halt the system.
+ </li>
+ <li>
+ <code>-p</code>: at the end of the shutdown sequence, poweroff the system.
+ </li>
+ <li>
+ <code>-r</code>: at the end of the shutdown sequence, reboot the system.
+ </li>
+ </ul>
+ <h2>Exit codes</h2>
+ <ul>
+ <li>
+ system-shutdown exits 100 if wrong options were used.
+ </li>
+ <li>
+ Since system-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>
+ system-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>Notes</h2>
+ <p>
+ There is a reason this program exists as part of (multiple)
+ goetia-init packages and not as part of
+ <a href="//0x53.net/software/goetia/goetia-base">goetia-base</a>.
+ It is that some supported init systems, like
+ <a href="https://skarnet.org/software/s6-linux-init/">s6-linux-init</a>
+ (through <a href="//0x53.net/software/goetia/goetia-s6-linux-init">goetia-s6-linux-init</a>)
+ provide their own shutdown procedure and interface.
+ </p>
+ </body>
+</html>