From df8c8876bc245c6124dd4691e5a95d8f397ca152 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 19 Dec 2014 01:28:09 +0000 Subject: Add examples/ subtree --- examples/ROOT/img/services-network/fifodir-cleanup/run | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 examples/ROOT/img/services-network/fifodir-cleanup/run (limited to 'examples/ROOT/img/services-network/fifodir-cleanup/run') 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 -- cgit v1.2.3