diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | config-joey.hs | 4 | ||||
| -rw-r--r-- | debian/changelog | 3 | ||||
| -rw-r--r-- | src/Propellor/Property/Tor.hs | 17 |
4 files changed, 18 insertions, 7 deletions
@@ -11,3 +11,4 @@ chroot propellor.1 .lock .lastchecked +.stack-work/* diff --git a/config-joey.hs b/config-joey.hs index 5c3fbaa0..acb20112 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -133,10 +133,10 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "amd64") fifteenpast "2h") + (System (Debian Testing) "amd64") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "i386") fifteenpast "2h") + (System (Debian Testing) "i386") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer (Cron.Times "1 1 * * *") "3h") where diff --git a/debian/changelog b/debian/changelog index 5f164e80..a93327f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ propellor (2.7.2) UNRELEASED; urgency=medium Thanks, Sean Whitton for completing the implementation. * Added Propellor.Property.LightDM Thanks, Sean Whitton. + * Multiple Tor.hiddenService properties can now be defined for a host; + previously only one such property worked per host. + Thanks, Félix Sipma. -- Joey Hess <id@joeyh.name> Thu, 20 Aug 2015 10:39:32 -0400 diff --git a/src/Propellor/Property/Tor.hs b/src/Propellor/Property/Tor.hs index f1aaeeb1..535da951 100644 --- a/src/Propellor/Property/Tor.hs +++ b/src/Propellor/Property/Tor.hs @@ -4,6 +4,7 @@ import Propellor import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Service as Service +import qualified Propellor.Property.ConfFile as ConfFile import Utility.FileMode import Utility.DataUnits @@ -112,11 +113,17 @@ hiddenServiceAvailable hn port = hiddenServiceHostName $ hiddenService hn port return r hiddenService :: HiddenServiceName -> Int -> Property NoInfo -hiddenService hn port = configured - [ ("HiddenServiceDir", varLib </> hn) - , ("HiddenServicePort", unwords [show port, "127.0.0.1:" ++ show port]) - ] - `describe` unwords ["hidden service available:", hn, show port] +hiddenService hn port = ConfFile.adjustSection + (unwords ["hidden service", hn, "available on port", show port]) + (== oniondir) + (not . isPrefixOf "HiddenServicePort") + (const [oniondir, onionport]) + (++ [oniondir, onionport]) + mainConfig + `onChange` restarted + where + oniondir = unwords ["HiddenServiceDir", varLib </> hn] + onionport = unwords ["HiddenServicePort", show port, "127.0.0.1:" ++ show port] hiddenServiceData :: IsContext c => HiddenServiceName -> c -> Property HasInfo hiddenServiceData hn context = combineProperties desc |
