summaryrefslogtreecommitdiffstats
path: root/src/lib/service/system/s6-svscan-log-console
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/service/system/s6-svscan-log-console')
-rw-r--r--src/lib/service/system/s6-svscan-log-console/notification-fd1
-rwxr-xr-xsrc/lib/service/system/s6-svscan-log-console/run16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/service/system/s6-svscan-log-console/notification-fd b/src/lib/service/system/s6-svscan-log-console/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/src/lib/service/system/s6-svscan-log-console/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/src/lib/service/system/s6-svscan-log-console/run b/src/lib/service/system/s6-svscan-log-console/run
new file mode 100755
index 0000000..63d32ba
--- /dev/null
+++ b/src/lib/service/system/s6-svscan-log-console/run
@@ -0,0 +1,16 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 1 2
+redirfd -a 1 /dev/console
+
+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 -- 1 @logconfig@ @tmpfsdir@/@sysrundir@/log/uncaught-logs