diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-02-26 16:11:38 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-02-26 16:17:19 -0400 |
| commit | 55ed8e8743e861e2230e40670a56034353cf4e32 (patch) | |
| tree | 3e5f8a965569f1dcf8a7c3cabd10e663924208dd /src/Propellor/Property/Tor.hs | |
| parent | 2ba4b6fb3d29b2b65aa60f4bd591ed8cf6a63e27 (diff) | |
use ConfigurableValue where applicable
* Removed fromPort (use val instead). (API change)
* Removed several Show instances that were only used for generating
configuration, replacing with ConfigurableValue instances. (API change)
It's somewhat annoying that IsInfo requires a Show instance.
That's needed to be able to display Info in ghci, but some non-derived Show
instances had to be kept to support that.
Diffstat (limited to 'src/Propellor/Property/Tor.hs')
| -rw-r--r-- | src/Propellor/Property/Tor.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/Tor.hs b/src/Propellor/Property/Tor.hs index 72bd45f5..24d5b687 100644 --- a/src/Propellor/Property/Tor.hs +++ b/src/Propellor/Property/Tor.hs @@ -128,7 +128,7 @@ hiddenService hn port = hiddenService' hn [port] hiddenService' :: HiddenServiceName -> [Port] -> Property DebianLike hiddenService' hn ports = ConfFile.adjustSection - (unwords ["hidden service", hn, "available on ports", intercalate "," (map fromPort ports')]) + (unwords ["hidden service", hn, "available on ports", intercalate "," (map val ports')]) (== oniondir) (not . isPrefixOf "HiddenServicePort") (const (oniondir : onionports)) @@ -139,7 +139,7 @@ hiddenService' hn ports = ConfFile.adjustSection oniondir = unwords ["HiddenServiceDir", varLib </> hn] onionports = map onionport ports' ports' = sort ports - onionport port = unwords ["HiddenServicePort", fromPort port, "127.0.0.1:" ++ fromPort port] + onionport port = unwords ["HiddenServicePort", val port, "127.0.0.1:" ++ val port] -- | Same as `hiddenService` but also causes propellor to display -- the onion address of the hidden service. |
