From d9723aeb87b66db09fa50f59a908f953aa3a23cc Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Mon, 31 Mar 2025 23:01:48 +0100 Subject: [PATCH] secrets subscriber: make restart-all work --- modules/secrets/subscriber.nix | 3 ++- pkgs/watch-outputs/watch-outputs.fnl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/secrets/subscriber.nix b/modules/secrets/subscriber.nix index 75cdd62..e8d2bc3 100644 --- a/modules/secrets/subscriber.nix +++ b/modules/secrets/subscriber.nix @@ -5,6 +5,7 @@ s6, s6-rc, watch-outputs, + s6-rc-up-tree }: { watch, @@ -47,7 +48,7 @@ let echo waiting for $dir if test -e $dir/notification-fd; then flag="-U"; else flag="-u"; fi ${s6}/bin/s6-svwait $flag /run/service/${name} || exit - PATH=${s6-rc}/bin:${s6}/bin:$PATH + PATH=${s6-rc}/bin:${s6}/bin:${s6-rc-up-tree}/bin:$PATH ${watch-outputs}/bin/watch-outputs ${restart-flag} ${name} ${refs} ''; }; diff --git a/pkgs/watch-outputs/watch-outputs.fnl b/pkgs/watch-outputs/watch-outputs.fnl index 38c427b..f23a865 100644 --- a/pkgs/watch-outputs/watch-outputs.fnl +++ b/pkgs/watch-outputs/watch-outputs.fnl @@ -54,7 +54,7 @@ (fn do-action [action service] (case action :restart (system (%% "s6-svc -r /run/service/%s" service)) - :restart-all (system (%% "s6-rc -b -d %q; s6-rc-up-tree %q" service service)) + :restart-all (system (%% "s6-rc -b -d change %q; s6-rc-up-tree %q" service service)) [:signal n] (system (%% "s6-svc -s %q /run/service/%s" n service)))) (local POLLIN 0x0001)