summaryrefslogtreecommitdiff
path: root/examples/ROOT/img/services-network/fifodir-cleanup/run
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 01:28:09 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 01:28:09 +0000
commitdf8c8876bc245c6124dd4691e5a95d8f397ca152 (patch)
treefcfec66704123b58c286aab83af16ab1b5248a21 /examples/ROOT/img/services-network/fifodir-cleanup/run
parent90acd08f35f9691753fdd523c6970365b6ea4b73 (diff)
downloads6-df8c8876bc245c6124dd4691e5a95d8f397ca152.tar.xz
Add examples/ subtree
Diffstat (limited to 'examples/ROOT/img/services-network/fifodir-cleanup/run')
-rwxr-xr-xexamples/ROOT/img/services-network/fifodir-cleanup/run14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/ROOT/img/services-network/fifodir-cleanup/run b/examples/ROOT/img/services-network/fifodir-cleanup/run
new file mode 100755
index 0000000..9928d84
--- /dev/null
+++ b/examples/ROOT/img/services-network/fifodir-cleanup/run
@@ -0,0 +1,14 @@
+#!/command/execlineb -P
+fdmove -c 2 1
+if
+{
+ forbacktickx -p -0 i { s6-ls -0 /service }
+ import i unexport i
+ foreground
+ {
+ if { s6-test -d /service/${i}/log }
+ s6-cleanfifodir /service/${i}/log/event
+ }
+ s6-cleanfifodir /service/${i}/event
+}
+s6-sleep 86400