Commit cc7791cf authored by Bjørn Forsman's avatar Bjørn Forsman
Browse files

nixos/lighttpd: add reload support

Allow reloading the webserver, which is useful when e.g there are new
certificates available that we want lighttpd to use, but don't want to
completely shut down the server.
parent 321b684c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ in
      after = [ "network.target" ];
      wantedBy = [ "multi-user.target" ];
      serviceConfig.ExecStart = "${cfg.package}/sbin/lighttpd -D -f ${configFile}";
      serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR1 $MAINPID";
      # SIGINT => graceful shutdown
      serviceConfig.KillSignal = "SIGINT";
    };
+1 −0
Original line number Diff line number Diff line
@@ -17,5 +17,6 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
    server.wait_for_unit("lighttpd.service")
    res = server.succeed("curl --fail http://localhost/file.txt")
    assert "hello nixos test" in res, f"bad server response: '{res}'"
    server.succeed("systemctl reload lighttpd")
  '';
})