From a04539a2ee46a3c040bf7a44a6954fa51a035315 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 17:51:10 -0400 Subject: propellor spin --- Propellor/Property/OpenId.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Propellor') diff --git a/Propellor/Property/OpenId.hs b/Propellor/Property/OpenId.hs index f7440370..2a55ff31 100644 --- a/Propellor/Property/OpenId.hs +++ b/Propellor/Property/OpenId.hs @@ -6,13 +6,13 @@ import qualified Propellor.Property.Apt as Apt import Data.List -providerFor :: [UserName] -> HostName -> Property -providerFor users hostname = propertyList ("openid provider") $ +providerFor :: [UserName] -> String -> Property +providerFor users baseurl = propertyList ("openid provider") $ [ serviceRunning "apache2" `requires` Apt.installed ["apache2"] , Apt.installed ["simpleid"] `onChange` serviceRestarted "apache2" - , File.fileProperty ("simpleid host " ++ hostname) + , File.fileProperty ("simpleid host " ++ baseurl) (map setbaseurl) "/etc/simpleid/config.inc" ] ++ map identfile users where @@ -20,5 +20,5 @@ providerFor users hostname = propertyList ("openid provider") $ [ "/var/lib/simpleid/identities/", u, ".identity" ] setbaseurl l | "SIMPLEID_BASE_URL" `isInfixOf` l = - "define('SIMPLEID_BASE_URL', 'http://"++hostname++"/simpleid');" + "define('SIMPLEID_BASE_URL', 'http://"++baseurl++"/simpleid');" | otherwise = l -- cgit v1.2.3