diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-27 01:59:54 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-27 01:59:54 +0000 |
commit | 89f1e294752c899ebdba06a6fbcfbcc390ecc807 (patch) | |
tree | 9fe02b61b8aef8d4d088762d1aae73179c5305fb /config/delete_device.lua | |
parent | 148d568b3db38ada9cf0c5085d2c71584d588598 (diff) | |
download | acf-provisioning-89f1e294752c899ebdba06a6fbcfbcc390ecc807.tar.bz2 acf-provisioning-89f1e294752c899ebdba06a6fbcfbcc390ecc807.tar.xz |
Pass logevent function to scripts
Diffstat (limited to 'config/delete_device.lua')
-rw-r--r-- | config/delete_device.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/delete_device.lua b/config/delete_device.lua index e009e74..edf9cf2 100644 --- a/config/delete_device.lua +++ b/config/delete_device.lua @@ -5,16 +5,16 @@ posix = require("posix") local root = "/var/www/provisioning/htdocs/" ---APP.logevent("got to delete_device script") +--functions.logevent("got to delete_device script") -- First, we delete the associated config files for Polycom with valid MAC (not blank or all 0's) if oldparams.value.device and string.match(oldparams.value.device.label, "Polycom") and oldparams.value.device.value.mac and string.match(oldparams.value.device.value.mac.value, "[1-9A-F]") then - --APP.logevent("Deleting files for "..oldparams.value.device.value.mac.value) + --functions.logevent("Deleting files for "..oldparams.value.device.value.mac.value) local path = root.."Polycom/" 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) + --functions.logevent("deleting "..path..d) os.remove(path..d) end end |