summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2023-11-02 22:47:24 +0100
committerHendrik Jäger <gitcommit@henk.geekmail.org>2023-11-02 22:47:24 +0100
commit740679f0f636204f6d9c70ff248479263ba2fea7 (patch)
tree53aee7ef2069dece88b42341c5c9d4395745f423
parent6c8d7cc73442389d4e9c4ecfa86f3f60361c21e4 (diff)
fix: script doesn’t end when killed and in a foreground block, so we turn this around and put the short-lived process in the foreground
-rw-r--r--templates/etc/s6-services/s6-logrotater/run.epp13
1 files changed, 7 insertions, 6 deletions
diff --git a/templates/etc/s6-services/s6-logrotater/run.epp b/templates/etc/s6-services/s6-logrotater/run.epp
index 9b678a9..f399d0a 100644
--- a/templates/etc/s6-services/s6-logrotater/run.epp
+++ b/templates/etc/s6-services/s6-logrotater/run.epp
@@ -4,9 +4,10 @@
#!/usr/local/bin/execlineb -P
<% } -%>
-foreground { sleep 10m }
-
-elglob -0 s6loggers /etc/s6-scandir/*/log
-forx -p logger { $s6loggers }
-importas -u logger logger
-s6-svc -a $logger
+foreground {
+ elglob -0 s6loggers /etc/s6-scandir/*/log
+ forx -p logger { $s6loggers }
+ importas -u logger logger
+ s6-svc -a $logger
+}
+sleep 10m