From 300fe1cc9a406784fc157461f13ddb7e7f00002f Mon Sep 17 00:00:00 2001 From: Izorkin Date: Wed, 15 Aug 2018 22:02:50 +0300 Subject: [PATCH 1/2] syslog-ng: fix reload service --- nixos/modules/services/logging/syslog-ng.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/logging/syslog-ng.nix b/nixos/modules/services/logging/syslog-ng.nix index 8466ff4630af..985b93a53746 100644 --- a/nixos/modules/services/logging/syslog-ng.nix +++ b/nixos/modules/services/logging/syslog-ng.nix @@ -88,7 +88,7 @@ in { StandardOutput = "null"; Restart = "on-failure"; ExecStart = "${cfg.package}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP ${pidFile}"; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP `${pkgs.coreutils}/bin/cat ${pidFile}`"; }; }; }; From e4f45891866976f4df72d9ab635659b6e8c380e1 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 16 Aug 2018 08:13:36 +0300 Subject: [PATCH 2/2] 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 985b93a53746..65e103ac2ba5 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"; }; }; };