diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-08-03 15:16:59 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-08-03 15:16:59 -0400 |
| commit | 497397274d061fb4d0df28a30c45e31dae4295cb (patch) | |
| tree | 9fd58f4ab6fa4fb2b3e1e67f7bf4131d8df5bf7f /src/Propellor/Property/Tor.hs | |
| parent | 76c9e82fd6326c85499f94e1906eb7cab03ff342 (diff) | |
| parent | b64a91db5767e2afcd53f496ba303ada8e3fdcc1 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Tor.hs')
| -rw-r--r-- | src/Propellor/Property/Tor.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Propellor/Property/Tor.hs b/src/Propellor/Property/Tor.hs index 3af4a70c..f1aaeeb1 100644 --- a/src/Propellor/Property/Tor.hs +++ b/src/Propellor/Property/Tor.hs @@ -103,13 +103,8 @@ bandwidthRate' s divby = case readSize dataUnits s of Nothing -> property ("unable to parse " ++ s) noChange hiddenServiceAvailable :: HiddenServiceName -> Int -> Property NoInfo -hiddenServiceAvailable hn port = hiddenServiceHostName prop +hiddenServiceAvailable hn port = hiddenServiceHostName $ hiddenService hn port where - prop = configured - [ ("HiddenServiceDir", varLib </> hn) - , ("HiddenServicePort", unwords [show port, "127.0.0.1:" ++ show port]) - ] - `describe` "hidden service available" hiddenServiceHostName p = adjustPropertySatisfy p $ \satisfy -> do r <- satisfy h <- liftIO $ readFile (varLib </> hn </> "hostname") @@ -164,7 +159,7 @@ type NickName = String -- | Convert String to a valid tor NickName. saneNickname :: String -> NickName -saneNickname s +saneNickname s | null n = "unnamed" | otherwise = n where |
