X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/f2cf641d13e1588e316468dc7f679d65f4633f26..b3cab94ce50ce0d5db660c166547d04f1c7a5e03:/lib/easy_domain.dtl diff --git a/lib/easy_domain.dtl b/lib/easy_domain.dtl index 47d8df7..db27d29 100644 --- a/lib/easy_domain.dtl +++ b/lib/easy_domain.dtl @@ -7,7 +7,7 @@ val webAt = \ n : (web_node) -> \ host : (host) -> \\ config : Vhost -> begin - dns (dnsA host (ip_of_node (web_node_to_node n))); + dns (dnsA (literal host) (ip_of_node (web_node_to_node n))); vhost host where WebPlaces = [web_place_default n] @@ -22,7 +22,7 @@ val webAtIp = \ ip : (your_ip) -> \ host : (host) -> \\ config : Vhost -> begin - dns (dnsA host (your_ip_to_ip ip)); + dns (dnsA (literal host) (your_ip_to_ip ip)); vhost host where WebPlaces = [web_place web_node ip] @@ -51,10 +51,21 @@ val dom = dns (dnsNS "ns1.hcoop.net"); dns (dnsNS "ns3.hcoop.net"); - dns (dnsDefaultA (ip_of_node (web_node_to_node web_node))); + dns (dnsA default (ip_of_node (web_node_to_node web_node))); - handleMail; - dns (dnsMX 1 "deleuze.hcoop.net"); + hmail : bool <- HandleMail; + if hmail then + handleMail + else + Skip + end; + + amx : bool <- AddMX; + if amx then + dns (dnsMX 1 "deleuze.hcoop.net") + else + Skip + end; createWWW : bool <- CreateWWW; if createWWW then @@ -74,10 +85,11 @@ val dom = end; val nameserver = \host -> dns (dnsNS host); -val dnsIP = \from -> \to -> dns (dnsA from to); -val dnsIPv6 = \from -> \to -> dns (dnsAAAA from to); +val dnsIP = \from -> \to -> dns (dnsA (literal from) to); +val dnsIPv6 = \from -> \to -> dns (dnsAAAA (literal from) to); val dnsMail = \num -> \host -> dns (dnsMX num host); -val dnsAlias = \from -> \to -> dns (dnsCNAME from to); -val dnsDefault = \to -> dns (dnsDefaultA to); -val dnsDefaultv6 = \to -> dns (dnsDefaultAAAA to); -val dnsText = \from -> \to -> dns (dnsTXT from to); +val dnsAlias = \from -> \to -> dns (dnsCNAME (literal from) to); +val dnsDefault = \to -> dns (dnsA default to); +val dnsDefaultv6 = \to -> dns (dnsAAAA default to); +val dnsText = \from -> \to -> dns (dnsTXT (srv_literal from) to); +val dnsDefaultText = \to -> dns (dnsTXT srv_default to);