summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/delete_device.lua4
-rw-r--r--config/determine_class.lua4
-rw-r--r--config/process_put.lua2
-rw-r--r--config/update_device.lua2
-rw-r--r--config/update_device_params.lua8
5 files changed, 10 insertions, 10 deletions
diff --git a/config/delete_device.lua b/config/delete_device.lua
index d7e34a1..542ed8b 100644
--- a/config/delete_device.lua
+++ b/config/delete_device.lua
@@ -5,7 +5,7 @@ require("posix")
local root = "/var/www/provisioning/htdocs/"
-APP.logevent("got to delete_device script")
+--APP.logevent("got to delete_device script")
-- First, we delete the associated config files
if oldparams.value.device and string.match(oldparams.value.device.label, "Polycom") and oldparams.value.device.value.mac then
@@ -13,7 +13,7 @@ if oldparams.value.device and string.match(oldparams.value.device.label, "Polyco
if posix.stat(path, "type") == "directory" then
for d in posix.files(path) do
if string.match(d, string.lower(oldparams.value.device.value.mac.value)) and posix.stat(path..d, "type") == "regular" then
- APP.logevent("deleting "..path..d)
+ --APP.logevent("deleting "..path..d)
os.remove(path..d)
end
end
diff --git a/config/determine_class.lua b/config/determine_class.lua
index bf7a2fb..675e6e8 100644
--- a/config/determine_class.lua
+++ b/config/determine_class.lua
@@ -1,7 +1,7 @@
-- This is the script run to determine the device class from the HTTP user agent
local functions, agent, classes = ...
-APP.logevent("got to determine_class script")
+--APP.logevent("got to determine_class script")
local manufacture, model
@@ -16,7 +16,7 @@ elseif string.match(agent, "snom") then
model = string.match(agent, "snom(%d+)")
end
-APP.logevent("Found "..(manufacture or "").." model "..(model or ""))
+--APP.logevent("Found "..(manufacture or "").." model "..(model or ""))
if manufacture and model then
for i,c in ipairs(classes.value) do
diff --git a/config/process_put.lua b/config/process_put.lua
index 33e918a..69e1c9e 100644
--- a/config/process_put.lua
+++ b/config/process_put.lua
@@ -1,7 +1,7 @@
-- This is the script run to process uploaded config files
local functions, mac, data, device_id = ...
-APP.logevent("got to process_put script")
+--APP.logevent("got to process_put script")
-- Get the params
local params = functions.get_device_params(device_id)
diff --git a/config/update_device.lua b/config/update_device.lua
index 90f5340..7295062 100644
--- a/config/update_device.lua
+++ b/config/update_device.lua
@@ -1,7 +1,7 @@
-- This is the script run after editing a device - the label, classes
local functions, device, olddevice, params, oldparams = ...
-APP.logevent("got to update_device script")
+--APP.logevent("got to update_device script")
-- We'll handle the changing of the device by handling the resulting changing of the params
local env = {}
diff --git a/config/update_device_params.lua b/config/update_device_params.lua
index 61d33d2..487765a 100644
--- a/config/update_device_params.lua
+++ b/config/update_device_params.lua
@@ -5,7 +5,7 @@ require("posix")
local root = "/var/www/provisioning/htdocs/"
-APP.logevent("got to update_device_params script")
+--APP.logevent("got to update_device_params script")
local function findip(mac)
if not mac or mac == "" then
@@ -20,10 +20,10 @@ end
local notify_device = function(mac, extension)
local ipaddr = findip(mac)
if ipaddr then
- APP.logevent("Notifying "..ipaddr.." to update for "..(mac or ""))
+ --APP.logevent("Notifying "..ipaddr.." to update for "..(mac or ""))
os.execute("/etc/provisioning/notify_device "..ipaddr.." "..extension)
else
- APP.logevent("Warning - could not find IP address for "..(mac or ""))
+ --APP.logevent("Warning - could not find IP address for "..(mac or ""))
end
end
@@ -37,7 +37,7 @@ if oldparams.value.device and oldparams.value.device.value.mac and oldparams.val
for d in posix.files(path) do
if string.match(d, string.lower(oldparams.value.device.value.mac.value)) and posix.stat(path..d, "type") == "regular" then
local newfile = string.gsub(d, string.lower(oldparams.value.device.value.mac.value), string.lower(params.value.device.value.mac.value))
- APP.logevent("moving "..path..d.." to "..path..newfile)
+ --APP.logevent("moving "..path..d.." to "..path..newfile)
os.rename(path..d, path..newfile)
end
end