From 980c5408489a3a3a56e49c3873f1bce6a0155cad Mon Sep 17 00:00:00 2001 From: PS
Date: Sun, 1 Feb 2026 12:02:03 +0100 Subject: version 0.2.0.0 --- src/bin/user-shutdown | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 src/bin/user-shutdown (limited to 'src/bin/user-shutdown') diff --git a/src/bin/user-shutdown b/src/bin/user-shutdown new file mode 100755 index 0000000..9376f5b --- /dev/null +++ b/src/bin/user-shutdown @@ -0,0 +1,23 @@ +#!@shebangdir@/execlineb -P + +# ISC license. + +multisubstitute { + importas -Si USER + importas -Si USERTREE +} +backtick -Ei HOME { homeof ${USER} } + +if -x0 { eltest -d @tmpfsdir@/@usrrundir@/${USER}/${USERTREE} } + +redirfd -wnb 1 @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/service/s6-svscan-log/fifo +fdmove -c 2 1 + +foreground { + foreground { echo "\nshutdown\n" } + s6-rc -l @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/s6-rc -v2 -b -da -t@timeout@ change +} + +foreground { s6-svscanctl -t @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/service } +foreground { s6-svc -h @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/service/s6-svscan-log } +foreground { rm -Rf @tmpfsdir@/@usrrundir@/${USER}/${USERTREE} } -- cgit v1.2.3