From 85e58f49ca676a3cfb34c6bfb27bb5d0b39e83f4 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Mon, 7 Mar 2016 14:29:07 +0100 Subject: add fromPort function (cherry picked from commit c3a23f89092d1ef8367c37ab8993ea7031124f4b) --- src/Propellor/Property/OpenId.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Propellor/Property/OpenId.hs') diff --git a/src/Propellor/Property/OpenId.hs b/src/Propellor/Property/OpenId.hs index bafca041..0f73bfb6 100644 --- a/src/Propellor/Property/OpenId.hs +++ b/src/Propellor/Property/OpenId.hs @@ -28,21 +28,21 @@ providerFor users hn mp = propertyList desc $ props where baseurl = hn ++ case mp of Nothing -> "" - Just (Port p) -> ':' : show p + Just p -> ':' : fromPort p url = "http://"++baseurl++"/simpleid" desc = "openid provider " ++ url setbaseurl l - | "SIMPLEID_BASE_URL" `isInfixOf` l = + | "SIMPLEID_BASE_URL" `isInfixOf` l = "define('SIMPLEID_BASE_URL', '"++url++"');" | otherwise = l - + apacheconfigured = case mp of Nothing -> toProp $ Apache.virtualHost hn (Port 80) "/var/www/html" Just p -> propertyList desc $ props & Apache.listenPorts [p] & Apache.virtualHost hn p "/var/www/html" - + -- the identities directory controls access, so open up -- file mode identfile (User u) = File.hasPrivContentExposed -- cgit v1.3-2-g0d8e