summaryrefslogtreecommitdiffstats
path: root/asterisk-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-11-03 11:56:12 +0000
committerTed Trask <ttrask01@yahoo.com>2009-11-03 11:56:12 +0000
commitc5a5b23ee797736062a5957d71faceb86461c30b (patch)
treec48615f099a4bd637a72757ea96d927ee1e10792 /asterisk-model.lua
parent79039dd34b67e4b8a4c5533d7f9b1f76d2f67d2f (diff)
downloadacf-asterisk-c5a5b23ee797736062a5957d71faceb86461c30b.tar.bz2
acf-asterisk-c5a5b23ee797736062a5957d71faceb86461c30b.tar.xz
Chmod and chown asterisk files, bumped to 0.2.1v0.2.1
Diffstat (limited to 'asterisk-model.lua')
-rw-r--r--asterisk-model.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/asterisk-model.lua b/asterisk-model.lua
index 0757bbc..446c631 100644
--- a/asterisk-model.lua
+++ b/asterisk-model.lua
@@ -37,7 +37,12 @@ get_file = function(filename)
end
update_file = function(filedetails)
- return modelfunctions.setfiledetails(filedetails, is_valid_filename)
+ local ret = modelfunctions.setfiledetails(filedetails, is_valid_filename)
+ if not ret.errtxt then
+ posix.chmod(filedetails.value.filename.value, "rw-------")
+ posix.chown(filedetails.value.filename.value, posix.getpasswd("asterisk", "uid") or 0, posix.getpasswd("asterisk", "gid") or 0)
+ end
+ return ret
end
list_files = function()