diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-02 14:16:53 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-02 14:16:53 -0400 |
commit | f0b41b4e142633c4203b06c9c53d9dabd2fc1ba9 (patch) | |
tree | 8efe11dd0c2b04df1265475ecefd9964e8303555 /Command/Assistant.hs | |
parent | ba9eb757f436902f94909a50a327cb68ec28ed4d (diff) |
assistant --autostart: First any daemons that are already running, which might be left over from a previous login session and so unable to use the ssh agent of a new login session.
Diffstat (limited to 'Command/Assistant.hs')
-rw-r--r-- | Command/Assistant.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Command/Assistant.hs b/Command/Assistant.hs index 97bc08c7b..8a916aa55 100644 --- a/Command/Assistant.hs +++ b/Command/Assistant.hs @@ -91,6 +91,12 @@ autoStart startdelay = do where go haveionice program dir = do setCurrentDirectory dir + -- First stop any old daemon running in this directory, which + -- might be a leftover from an old login session. Such a + -- leftover might be left in an environment where it is + -- unavble to use the ssh agent or other login session + -- resources. + void $ boolSystem program [Param "assistant", Param "--stop"] if haveionice then boolSystem "ionice" (Param "-c3" : Param program : baseparams) else boolSystem program baseparams |