summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-06-08 14:55:15 -0400
committerTed Trask <ttrask01@yahoo.com>2015-06-08 14:55:15 -0400
commit75c86c5c29da5c90820b421753219b520f17852b (patch)
tree8bd8739c8b2ebc3d782678d27729d9619ff926ab
parenta5f0e843849aad23fcbc4986699d36547aacd0e4 (diff)
downloadacf-provisioning-75c86c5c29da5c90820b421753219b520f17852b.tar.bz2
acf-provisioning-75c86c5c29da5c90820b421753219b520f17852b.tar.xz
Update cyberdata and grandstream templates to properly require LuaXml
-rw-r--r--config/templates/cyberdata-template.lua6
-rw-r--r--config/templates/grandstream-template.lua8
2 files changed, 8 insertions, 6 deletions
diff --git a/config/templates/cyberdata-template.lua b/config/templates/cyberdata-template.lua
index e05bdd9..515cceb 100644
--- a/config/templates/cyberdata-template.lua
+++ b/config/templates/cyberdata-template.lua
@@ -1,8 +1,11 @@
+<?xml version="1.0" standalone="yes"?>
+
<%
-- CyberData Intercom Configuration File Template
local values = ...
-require 'LuaXml'
+xml = require("LuaXml")
+
local init_cfg = xml.load("/var/www/provisioning/htdocs/CyberData/init.cfg")
-- <IPSettings>
@@ -32,6 +35,5 @@ init_cfg[3]:append("NTPTimezone")[1] = values.device.timezone
-- init_cfg:save("TEST-cyberdata.xml")
-print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
print(init_cfg)
%>
diff --git a/config/templates/grandstream-template.lua b/config/templates/grandstream-template.lua
index cf1e95e..f6957ff 100644
--- a/config/templates/grandstream-template.lua
+++ b/config/templates/grandstream-template.lua
@@ -1,8 +1,11 @@
+<?xml version="1.0" standalone="yes"?>
+
<%
-- Grandstream Configuration File Template
local values = ...
-require 'LuaXml'
+xml = require("LuaXml")
+
local init_cfg = xml.load("/var/www/provisioning/htdocs/Grandstream/init.cfg")
-- <config>
@@ -32,8 +35,5 @@ for pg, pg_t in pairs(values) do
end
end
--- init_cfg:save("TEST-grandstream.xml")
-
-print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
print(init_cfg)
%>