summaryrefslogtreecommitdiffstats
path: root/src/bin/user-ml
diff options
context:
space:
mode:
authorPS <p@0x53.net>2026-02-01 12:02:03 +0100
committerPS <p@0x53.net>2026-02-01 12:02:03 +0100
commit980c5408489a3a3a56e49c3873f1bce6a0155cad (patch)
tree91df5fa62e7eca03d04b8ed114b20b337b99a556 /src/bin/user-ml
downloadgoetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.gz
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.tar.bz2
goetia-base-980c5408489a3a3a56e49c3873f1bce6a0155cad.zip
version 0.2.0.0
Diffstat (limited to 'src/bin/user-ml')
-rwxr-xr-xsrc/bin/user-ml33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/bin/user-ml b/src/bin/user-ml
new file mode 100755
index 0000000..60a01ab
--- /dev/null
+++ b/src/bin/user-ml
@@ -0,0 +1,33 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+multisubstitute {
+ importas -Si USER
+ importas -Si HOME
+ importas -Si USERTREE
+}
+
+define LOGSCRIPT "#!@shebangdir@/execlineb -P
+
+fdmove -c 1 2
+
+if { mkdir -p -m750 -- ${HOME}/@usrlogdir@/${USERTREE}/${NAME} }
+s6-log -bd3 @logconfig@ ${HOME}/@usrlogdir@/${USERTREE}/${NAME}"
+
+if { rm -Rf ${HOME}/@usrconfdir@/${USERTREE}/src/generated-logger }
+if { mkdir -p ${HOME}/@usrconfdir@/${USERTREE}/src/generated-logger }
+
+elglob LONGRUNS ${HOME}/@usrconfdir@/${USERTREE}/src/*/*
+forx -pE LONGRUN { ${LONGRUNS} }
+ if -x0 { eltest -f ${LONGRUN}/producer-for }
+ if -x0 -n { eltest -f ${LONGRUN}/no-ml }
+ if { echo Making the logger of ${LONGRUN} }
+ pipeline { sed -e s/-log$// -- ${LONGRUN}/producer-for }
+ withstdinas -E NAME
+ longrun-make
+ ${HOME}/@usrconfdir@/${USERTREE}/src/generated-logger
+ ${NAME}
+ log
+ ${LOGSCRIPT}
+ none