summaryrefslogtreecommitdiffstats
path: root/src/lib/service/system/s6-svscan-log/run
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/service/system/s6-svscan-log/run')
-rwxr-xr-xsrc/lib/service/system/s6-svscan-log/run15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/service/system/s6-svscan-log/run b/src/lib/service/system/s6-svscan-log/run
new file mode 100755
index 0000000..e8c4022
--- /dev/null
+++ b/src/lib/service/system/s6-svscan-log/run
@@ -0,0 +1,15 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 1 2
+
+if { mkdir -p -m750 -- @tmpfsdir@/@sysrundir@/log/uncaught-logs }
+# fifo is created in prepare-svscan
+if { chown -R @loguser@:@loguser@ @tmpfsdir@/@sysrundir@/log fifo }
+
+s6-setuidgid @loguser@
+
+redirfd -rnb 0 fifo
+
+s6-log -bpd3 -- @logconfig@ @tmpfsdir@/@sysrundir@/log/uncaught-logs