summaryrefslogtreecommitdiffstats
path: root/src/bin/system-shutdown
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-01 12:06:01 +0100
committerPS <p@0x53.net>2026-02-01 12:06:01 +0100
commit0f936e1351d95d7b7bb8ac4b64fc2a87f2982d8c (patch)
tree30e5af481a10ad099076ec172542a8dc8ffeea58 /src/bin/system-shutdown
downloadgoetia-freebsd-init-0f936e1351d95d7b7bb8ac4b64fc2a87f2982d8c.tar.gz
goetia-freebsd-init-0f936e1351d95d7b7bb8ac4b64fc2a87f2982d8c.tar.bz2
goetia-freebsd-init-0f936e1351d95d7b7bb8ac4b64fc2a87f2982d8c.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