From d9af87743c7a3d4e749ee57c2379153715873da5 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Thu, 20 Aug 2015 23:08:48 +0200 Subject: add .stack-work/* to .gitignore Signed-off-by: Félix Sipma --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 19bd3f0e..431b1c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ chroot propellor.1 .lock .lastchecked +.stack-work/* -- cgit v1.2.3 From d73ad07f8bd0c96531b72d9d67e78a397741ee22 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2015 08:20:00 -0700 Subject: propellor spin --- config-joey.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index 5c3fbaa0..dc43491c 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -131,9 +131,9 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Apt.serviceInstalledRunning "ntp" & Systemd.persistentJournal - & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer + ! 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") -- cgit v1.2.3 From b91dd5d50dae077d1380b0b171fc6e97cec38f5b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2015 08:22:48 -0700 Subject: propellor spin --- config-joey.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-joey.hs b/config-joey.hs index dc43491c..9f30123c 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -131,7 +131,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Apt.serviceInstalledRunning "ntp" & Systemd.persistentJournal - ! Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer + & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder (System (Debian Testing) "amd64") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer -- cgit v1.2.3 From 178ca7a80d1ebfbd3830aa6d907a6a30f210c065 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2015 08:40:04 -0700 Subject: propellor spin --- config-joey.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-joey.hs b/config-joey.hs index 9f30123c..9c28829f 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -134,7 +134,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder (System (Debian Testing) "amd64") fifteenpast "2h") - & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer + ! Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder (System (Debian Unstable) "i386") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer -- cgit v1.2.3 From 4125d5039ac666591108ffe24c8803bc407f85c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2015 08:41:36 -0700 Subject: propellor spin --- config-joey.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index 9c28829f..acb20112 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -134,9 +134,9 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder (System (Debian Testing) "amd64") fifteenpast "2h") - ! Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer + & 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 -- cgit v1.2.3 From a5efaff1a69a697c4bcd79049ddfe37f67390dfd Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Thu, 20 Aug 2015 19:46:01 +0200 Subject: use ConfFile.ajustSection to define Tor.hiddenService It should be possible to have multiple hidden services with this. Signed-off-by: Félix Sipma --- src/Propellor/Property/Tor.hs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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 -- cgit v1.2.3 From 2d5dae129a29990f182104840c58249443a11cf3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2015 11:54:39 -0700 Subject: changelog --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) 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 Thu, 20 Aug 2015 10:39:32 -0400 -- cgit v1.2.3