modules/consul-service-registry: wait for consul

This commit is contained in:
Max Headroom 2023-12-01 23:14:50 +01:00
parent 03e802bcab
commit abc3b0b324

View file

@ -81,13 +81,14 @@ let
}.${mode};
value = {
direct = {
after = [ "consul.service" ];
serviceConfig = {
ExecStartPost = register servicesJson;
ExecStopPost = deregister servicesJson;
};
};
external = {
after = [ "${unit}.service" ];
after = [ "consul.service" "${unit}.service" ];
wantedBy = [ "${unit}.service" ];
unitConfig.BindsTo = "${unit}.service";
serviceConfig = {