summaryrefslogtreecommitdiff
path: root/examples/s6
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-11-20 14:51:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-11-20 14:51:36 +0000
commit4ba5ae5776c2e9ba4f297115c19923a928cf3e87 (patch)
tree5a67f39a64dc5df84fc20307aa95d7536890b8b5 /examples/s6
downloadutmps-4ba5ae5776c2e9ba4f297115c19923a928cf3e87.tar.xz
Initial release / rename to utmps
Diffstat (limited to 'examples/s6')
-rwxr-xr-xexamples/s6/utmpd/log/run5
-rw-r--r--examples/s6/utmpd/notification-fd1
-rwxr-xr-xexamples/s6/utmpd/run11
-rwxr-xr-xexamples/s6/wtmpd/log/run5
-rw-r--r--examples/s6/wtmpd/notification-fd1
-rwxr-xr-xexamples/s6/wtmpd/run9
6 files changed, 32 insertions, 0 deletions
diff --git a/examples/s6/utmpd/log/run b/examples/s6/utmpd/log/run
new file mode 100755
index 0000000..586e53d
--- /dev/null
+++ b/examples/s6/utmpd/log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -P
+
+s6-setuidgid utmplog
+exec -c
+s6-log t /var/log/utmpd
diff --git a/examples/s6/utmpd/notification-fd b/examples/s6/utmpd/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6/utmpd/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6/utmpd/run b/examples/s6/utmpd/run
new file mode 100755
index 0000000..238069b
--- /dev/null
+++ b/examples/s6/utmpd/run
@@ -0,0 +1,11 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+foreground { mkdir -p -m 0755 /run/utmps }
+foreground { chown utmp:utmp /run/utmps }
+unexport ?
+s6-setuidgid utmp
+cd /run/utmps
+fdmove 1 3
+s6-ipcserver -1 -- /run/utmps/utmpd-socket
+utmps-utmpd
diff --git a/examples/s6/wtmpd/log/run b/examples/s6/wtmpd/log/run
new file mode 100755
index 0000000..5dd01cb
--- /dev/null
+++ b/examples/s6/wtmpd/log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -P
+
+s6-setuidgid utmplog
+exec -c
+s6-log t /var/log/utmps-wtmpd
diff --git a/examples/s6/wtmpd/notification-fd b/examples/s6/wtmpd/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6/wtmpd/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6/wtmpd/run b/examples/s6/wtmpd/run
new file mode 100755
index 0000000..9cc49b7
--- /dev/null
+++ b/examples/s6/wtmpd/run
@@ -0,0 +1,9 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+unexport ?
+s6-setuidgid utmp
+cd /run/utmps
+fdmove 1 3
+s6-ipcserver -1 -- /run/utmps/wtmpd-socket
+utmps-wtmpd