summaryrefslogtreecommitdiff
path: root/examples/source/fifodir-cleanup/run
diff options
context:
space:
mode:
Diffstat (limited to 'examples/source/fifodir-cleanup/run')
-rwxr-xr-xexamples/source/fifodir-cleanup/run15
1 files changed, 15 insertions, 0 deletions
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