diff options
| author | Joey Hess <joey@kitenet.net> | 2014-11-22 16:20:02 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-11-22 16:20:02 -0400 |
| commit | a4edc404f0d91db54e13dace7be265a2611de5d6 (patch) | |
| tree | d8b7f4f84904852139e812b5109b57ca2350d3fb /src/Propellor/Ssh.hs | |
| parent | dca7ec5d2c7503cefda77d24bb22312caad9ac4d (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Ssh.hs')
| -rw-r--r-- | src/Propellor/Ssh.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Propellor/Ssh.hs b/src/Propellor/Ssh.hs index ecdb54d2..97c3eb6d 100644 --- a/src/Propellor/Ssh.hs +++ b/src/Propellor/Ssh.hs @@ -14,17 +14,16 @@ import Data.Time.Clock.POSIX -- minutes, and if so stop that ssh process, in order to not try to -- use an old stale connection. (atime would be nicer, but there's -- a good chance a laptop uses noatime) -sshCachingParams :: HostName -> Bool -> IO [CommandParam] -sshCachingParams hn viarelay = do +sshCachingParams :: HostName -> IO [CommandParam] +sshCachingParams hn = do home <- myHomeDir let cachedir = home </> ".ssh" </> "propellor" createDirectoryIfMissing False cachedir let socketfile = cachedir </> hn ++ ".sock" - let ps = catMaybes - [ if viarelay then Just (Param "-A") else Nothing - , Just $ Param "-o" - , Just $ Param ("ControlPath=" ++ socketfile) - , Just $ Params "-o ControlMaster=auto -o ControlPersist=yes" + let ps = + [ Param "-o" + , Param ("ControlPath=" ++ socketfile) + , Params "-o ControlMaster=auto -o ControlPersist=yes" ] maybe noop (expireold ps socketfile) |
