Tor: change unlines to unwords in description messages
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
This commit is contained in:
parent
e7d2c38a59
commit
3679a49353
|
@ -25,15 +25,15 @@ hiddenServiceAvailable :: HiddenServiceName -> Int -> Property
|
||||||
hiddenServiceAvailable hn port = hiddenServiceHostName prop
|
hiddenServiceAvailable hn port = hiddenServiceHostName prop
|
||||||
where
|
where
|
||||||
prop = mainConfig `File.containsLines`
|
prop = mainConfig `File.containsLines`
|
||||||
[ unlines ["HiddenServiceDir", varLib </> hn]
|
[ unwords ["HiddenServiceDir", varLib </> hn]
|
||||||
, unlines ["HiddenServicePort", show port, "127.0.0.1:" ++ show port]
|
, unwords ["HiddenServicePort", show port, "127.0.0.1:" ++ show port]
|
||||||
]
|
]
|
||||||
`describe` "hidden service available"
|
`describe` "hidden service available"
|
||||||
`onChange` Service.reloaded "tor"
|
`onChange` Service.reloaded "tor"
|
||||||
hiddenServiceHostName p = adjustProperty p $ \satisfy -> do
|
hiddenServiceHostName p = adjustProperty p $ \satisfy -> do
|
||||||
r <- satisfy
|
r <- satisfy
|
||||||
h <- liftIO $ readFile (varLib </> hn </> "hostname")
|
h <- liftIO $ readFile (varLib </> hn </> "hostname")
|
||||||
warningMessage $ unlines ["hidden service hostname:", h]
|
warningMessage $ unwords ["hidden service hostname:", h]
|
||||||
return r
|
return r
|
||||||
|
|
||||||
hiddenService :: HiddenServiceName -> Int -> Property
|
hiddenService :: HiddenServiceName -> Int -> Property
|
||||||
|
@ -50,7 +50,7 @@ hiddenServiceData hn context = combineProperties desc
|
||||||
, installonion "private_key"
|
, installonion "private_key"
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
desc = unlines ["hidden service data available in", varLib </> hn]
|
desc = unwords ["hidden service data available in", varLib </> hn]
|
||||||
installonion f = withPrivData (PrivFile $ varLib </> hn </> f) context $ \getcontent ->
|
installonion f = withPrivData (PrivFile $ varLib </> hn </> f) context $ \getcontent ->
|
||||||
property desc $ getcontent $ install $ varLib </> hn </> f
|
property desc $ getcontent $ install $ varLib </> hn </> f
|
||||||
install f content = ifM (liftIO $ doesFileExist f)
|
install f content = ifM (liftIO $ doesFileExist f)
|
||||||
|
|
Loading…
Reference in New Issue