diff options
author | Florian Klink <flokli@flokli.de> | 2020-08-12 18:47:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 18:47:02 +0200 |
commit | 22e8ada3b3c5fe6d33da9bf8e4d73e3be9fdc993 (patch) | |
tree | d411d9e4a5d5d50e94a55c916e3d28049176c590 /nixos | |
parent | fddeb7cb73096786de8e59a8502cf3ae523bd694 (diff) | |
parent | 300049ca51522a8d74ae5125871e7f85a9eb114e (diff) |
Merge pull request #95264 from flokli/nginx-config-reload
nixos/nginx: move configuration testing script into reload command
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 4c4b7f39e6bb..461888c4cc4f 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -704,7 +704,10 @@ in ''; serviceConfig = { ExecStart = execCommand; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + ExecReload = [ + "${execCommand} -t" + "${pkgs.coreutils}/bin/kill -HUP $MAINPID" + ]; Restart = "always"; RestartSec = "10s"; StartLimitInterval = "1min"; @@ -761,8 +764,7 @@ in serviceConfig.TimeoutSec = 60; script = '' if /run/current-system/systemd/bin/systemctl -q is-active nginx.service ; then - ${execCommand} -t && \ - /run/current-system/systemd/bin/systemctl reload nginx.service + /run/current-system/systemd/bin/systemctl reload nginx.service fi ''; serviceConfig.RemainAfterExit = true; |