unconditionally restart trigger services on liminix-rebuild
We call s6-rc -u -p default to restart/start the base services on a rebuild, otherwise services that are only in the new configuration won't come up. However, this stops any service started by a trigger. So, workaround is to restart the trigger service and expect it to restart the services it manages if they're needed
This commit is contained in:
@@ -11,7 +11,7 @@ test -n "$contents" && for d in $contents; do
|
||||
touch $out/${name}/contents.d/$d
|
||||
done
|
||||
|
||||
for i in timeout-up timeout-down run notification-fd up down consumer-for producer-for pipeline-name ; do
|
||||
for i in timeout-up timeout-down run notification-fd up down consumer-for producer-for pipeline-name restart-on-upgrade; do
|
||||
test -n "$(printenv $i)" && (echo "$(printenv $i)" > $out/${name}/$i)
|
||||
done
|
||||
|
||||
|
@@ -36,12 +36,14 @@ let
|
||||
, dependencies ? []
|
||||
, contents ? []
|
||||
, buildInputs ? []
|
||||
, isTrigger ? false
|
||||
} @ args:
|
||||
stdenvNoCC.mkDerivation {
|
||||
# we use stdenvNoCC to avoid generating derivations with names
|
||||
# like foo.service-mips-linux-musl
|
||||
inherit name serviceType up down run notification-fd
|
||||
producer-for consumer-for pipeline-name timeout-up timeout-down;
|
||||
restart-on-upgrade = isTrigger;
|
||||
buildInputs = buildInputs ++ dependencies ++ contents;
|
||||
dependencies = builtins.map (d: d.name) dependencies;
|
||||
contents = builtins.map (d: d.name) contents;
|
||||
|
Reference in New Issue
Block a user