forked from mirrors/nixpkgs
Consider the exit status of docker run in ExecStop (#76444)
We don't need to stop the container if it already exited sucessfully
This commit is contained in:
parent
f4375dd320
commit
a461f3fa9c
|
@ -186,7 +186,7 @@ let
|
|||
++ map escapeShellArg container.cmd
|
||||
);
|
||||
ExecStartPre = "-${pkgs.docker}/bin/docker rm -f %n";
|
||||
ExecStop = "${pkgs.docker}/bin/docker stop %n";
|
||||
ExecStop = ''${pkgs.bash}/bin/sh -c "[ $SERVICE_RESULT = success ] || ${pkgs.docker}/bin/docker stop %n"'';
|
||||
ExecStopPost = "-${pkgs.docker}/bin/docker rm -f %n";
|
||||
|
||||
### There is no generalized way of supporting `reload` for docker
|
||||
|
|
Loading…
Reference in a new issue