summaryrefslogtreecommitdiff
path: root/examples/source/fifodir-cleanup
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-07-12 05:33:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-07-12 05:33:01 +0000
commitdb7e83c95875fdc630a4014b323f9fbec205ba6c (patch)
tree41e0ec15c6c8fc4a6abdfa8179327fa083a8729e /examples/source/fifodir-cleanup
parent1cdd470038332a0355d7923483fc7b23cd7e8b7a (diff)
downloads6-rc-db7e83c95875fdc630a4014b323f9fbec205ba6c.tar.xz
Added the example source.
Diffstat (limited to 'examples/source/fifodir-cleanup')
-rw-r--r--examples/source/fifodir-cleanup/dependencies1
-rwxr-xr-xexamples/source/fifodir-cleanup/run15
-rw-r--r--examples/source/fifodir-cleanup/type1
3 files changed, 17 insertions, 0 deletions
diff --git a/examples/source/fifodir-cleanup/dependencies b/examples/source/fifodir-cleanup/dependencies
new file mode 100644
index 0000000..4daddb7
--- /dev/null
+++ b/examples/source/fifodir-cleanup/dependencies
@@ -0,0 +1 @@
+00
diff --git a/examples/source/fifodir-cleanup/run b/examples/source/fifodir-cleanup/run
new file mode 100755
index 0000000..5a34a9b
--- /dev/null
+++ b/examples/source/fifodir-cleanup/run
@@ -0,0 +1,15 @@
+#!/command/execlineb -P
+fdmove -c 2 1
+if
+{
+ forbacktickx -ep -0 i { s6-ls -0 /service }
+ import -u i
+ foreground
+ {
+ if { s6-test -d /service/${i}/log }
+ s6-cleanfifodir /service/${i}/log/event
+ }
+ s6-cleanfifodir /service/${i}/event
+}
+s6-setuidgid nobody
+s6-sleep 86400
diff --git a/examples/source/fifodir-cleanup/type b/examples/source/fifodir-cleanup/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/source/fifodir-cleanup/type
@@ -0,0 +1 @@
+longrun