mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/dictd: treat SIGTERM exit status as success
dictd doesn't handle SIGTERM and terminates with code 143 (128 + 15 (SIGTERM) instead of 0. This results in systemd marking the service as failed when a user stops it (with `systemctl stop dictd`). Fix it by treating code 143 as success.
This commit is contained in:
parent
70846faf16
commit
7db3dc0fa4
@ -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";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user