From e4f45891866976f4df72d9ab635659b6e8c380e1 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 16 Aug 2018 08:13:36 +0300 Subject: [PATCH] syslog-ng: fix reload service --- nixos/modules/services/logging/syslog-ng.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/logging/syslog-ng.nix b/nixos/modules/services/logging/syslog-ng.nix index 985b93a5374..65e103ac2ba 100644 --- a/nixos/modules/services/logging/syslog-ng.nix +++ b/nixos/modules/services/logging/syslog-ng.nix @@ -85,10 +85,11 @@ in { after = [ "multi-user.target" ]; # makes sure hostname etc is set serviceConfig = { Type = "notify"; + PIDFile = pidFile; StandardOutput = "null"; Restart = "on-failure"; ExecStart = "${cfg.package}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP `${pkgs.coreutils}/bin/cat ${pidFile}`"; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; }; }; };