aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/system-shutdown
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-01 12:04:04 +0100
committerPS <p@0x53.net>2026-02-01 12:04:04 +0100
commite613c3945d4d81cce398c73fe7714860eb113006 (patch)
tree7b000a29d45af0a9ccb5038f053d47ac270af275 /src/bin/system-shutdown
downloadgoetia-linux-init-e613c3945d4d81cce398c73fe7714860eb113006.tar.gz
goetia-linux-init-e613c3945d4d81cce398c73fe7714860eb113006.tar.bz2
goetia-linux-init-e613c3945d4d81cce398c73fe7714860eb113006.zip
version 0.2.0.0
Diffstat (limited to 'src/bin/system-shutdown')
-rwxr-xr-xsrc/bin/system-shutdown14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/system-shutdown b/src/bin/system-shutdown
new file mode 100755
index 0000000..53b2d4b
--- /dev/null
+++ b/src/bin/system-shutdown
@@ -0,0 +1,14 @@
+#!@shebangdir@/execlineb -s0
+
+# ISC license.
+
+ifelse { eltest \\\\${@} =~ ^-[hpr]$ } {
+ if { mkdir -p @tmpfsdir@/@sysrundir@/shutdown-directive }
+ if {
+ redirfd -w 1 @tmpfsdir@/@sysrundir@/shutdown-directive/DIRECTIVE
+ echo ${@}
+ }
+ s6-svc -U @tmpfsdir@/@sysrundir@/service/goetia-shutdown
+}
+if { echo "system-shutdown: usage: system-shutdown -h | -p | -r" }
+exit 100