Merge pull request #323020 from bjornfor/nixos-dictd-exit-status

nixos/dictd: treat SIGTERM exit status as success
This commit is contained in:
Aleksana 2024-07-05 02:01:21 +08:00 committed by GitHub
commit 1c1df68b1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,6 +62,9 @@ in
description = "DICT.org Dictionary Server";
wantedBy = [ "multi-user.target" ];
environment = { LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; };
# Work around the fact that dictd doesn't handle SIGTERM; it terminates
# with code 143 instead of exiting with code 0.
serviceConfig.SuccessExitStatus = [ 143 ];
serviceConfig.Type = "forking";
script = "${pkgs.dict}/sbin/dictd -s -c ${dictdb}/share/dictd/dictd.conf --locale en_US.UTF-8";
};