git://git.exim.org
/
exim-dns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a01ff63
)
Better LUA styling - handle default values better
author
Nigel Metheringham
<nigel@exim.org>
Thu, 19 Apr 2012 11:52:38 +0000
(12:52 +0100)
committer
Nigel Metheringham
<nigel@exim.org>
Thu, 19 Apr 2012 11:52:38 +0000
(12:52 +0100)
templates.lua
patch
|
blob
|
history
diff --git
a/templates.lua
b/templates.lua
index a9dfe061200366fa1fc9f0e2d01202f671b7a3c8..210ccb3624e85c7482e67be60b5edc018fe66df5 100644
(file)
--- a/
templates.lua
+++ b/
templates.lua
@@
-3,10
+3,7
@@
--
function google_app(domain, ttl)
- local ttl = ttl
- if ttl == nil then
- ttl = 7200
- end
+ local ttl = ttl or 28800
-- Configure mail exchangers
mx(domain, 'aspmx.l.google.com', 10, ttl)
@@
-31,10
+28,7
@@
end
function a_and_aaaa(domain, ipv4, ipv6, ttl)
- local ttl = ttl
- if ttl == nil then
- ttl = 7200
- end
+ local ttl = ttl or 28800
a(domain, ipv4, ttl)
aaaa(domain, ipv6, ttl)