-- other daemons. Stop them when done. This only affects
-- daemons started for the GNUPGHOME that was used.
-- Older gpg may not support this, so ignore failure.
- stopgpgagent = void $ boolSystem "gpgconf"
- [Param "--kill", Param "all"]
+ stopgpgagent = whenM (inPath "gpgconf") $
+ void $ boolSystem "gpgconf" [Param "--kill", Param "all"]
go (Just _) = Just <$> a
go Nothing = return Nothing
-- | Run a system command, and returns True or False if it succeeded or failed.
--
+-- (Throws an exception if the command is not found.)
+--
-- This and other command running functions in this module log the commands
-- run at debug level, using System.Log.Logger.
boolSystem :: FilePath -> [CommandParam] -> IO Bool