summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2022-05-05 21:28:33 +0200
committerHendrik Jäger <gitcommit@henk.geekmail.org>2022-05-22 20:04:54 +0200
commitb63cb7937892c18a9c3c6da6b06e0c9a5fe7b3a1 (patch)
tree9e0122e34870f94705f84b3f62cc77939dabb3fb
parent087f73b5c34b887fd774bda4251c5084d6631679 (diff)
use globbing instead of parsing ls
-rw-r--r--templates/etc/s6-services/s6-logrotater/run.epp8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/etc/s6-services/s6-logrotater/run.epp b/templates/etc/s6-services/s6-logrotater/run.epp
index 347f85d..9b678a9 100644
--- a/templates/etc/s6-services/s6-logrotater/run.epp
+++ b/templates/etc/s6-services/s6-logrotater/run.epp
@@ -6,7 +6,7 @@
foreground { sleep 10m }
-forbacktickx -p s6svc { ls -1N /etc/s6-scandir/ }
-importas -u s6svc s6svc
-if { test -d /etc/s6-scandir/\${s6svc}/log }
-s6-svc -a /etc/s6-scandir/\${s6svc}/log
+elglob -0 s6loggers /etc/s6-scandir/*/log
+forx -p logger { $s6loggers }
+importas -u logger logger
+s6-svc -a $logger