2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 12:43:52 +00:00

nixos/consul: use signal instead of api for reload

consul might require authentication if acls are enabled for `consul
reload` to work. Signals never require authentication.
This commit is contained in:
Jörg Thalheim 2022-08-11 13:28:37 +02:00
parent 52d8a81a85
commit 8ccf4e05df

View File

@ -201,7 +201,7 @@ in
serviceConfig = {
ExecStart = "@${cfg.package}/bin/consul consul agent -config-dir /etc/consul.d"
+ concatMapStrings (n: " -config-file ${n}") configFiles;
ExecReload = "${cfg.package}/bin/consul reload";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
PermissionsStartOnly = true;
User = if cfg.dropPrivileges then "consul" else null;
Restart = "on-failure";