X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FSystemConfig.hs;fp=Rakka%2FSystemConfig.hs;h=d15bc9d99a0f2bc6edb65ed467b62631d9e6a964;hb=45bce2c29948649f74ada71f2fa851bdb812e96c;hp=029d307ca2757560c413fd024e5ad1b348a82ad9;hpb=42f51754dea02201aececaacbf194d714cd58aaf;p=Rakka.git diff --git a/Rakka/SystemConfig.hs b/Rakka/SystemConfig.hs index 029d307..d15bc9d 100644 --- a/Rakka/SystemConfig.hs +++ b/Rakka/SystemConfig.hs @@ -230,9 +230,14 @@ instance SysConfValue BaseURI where defaultValue sc = let conf = scLucuConf sc host = C8.unpack $ LC.cnfServerHost conf - port = unsafePerformIO ∘ getServicePortNumber $ LC.cnfServerPort conf + port = unsafePerformIO $ + do ent <- getServiceByName (LC.cnfServerPort conf) "tcp" + return (servicePort ent) + -- FIXME: There should be a way to change configurations + -- without web interface nor direct repository + -- modification. defaultURI - = "http://" ++ host ++ -- FIXME: consider IPv6 address + = "http://" ++ host ++ (if port == 80 then "" else ':' : show port) ++ "/"