summaryrefslogtreecommitdiffstats
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
parent79039dd34b67e4b8a4c5533d7f9b1f76d2f67d2f (diff)
downloadacf-asterisk-c5a5b23ee797736062a5957d71faceb86461c30b.tar.bz2
acf-asterisk-c5a5b23ee797736062a5957d71faceb86461c30b.tar.xz
Chmod and chown asterisk files, bumped to 0.2.1v0.2.1
-rw-r--r--Makefile2
-rw-r--r--asterisk-model.lua7
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 512a1e2..4b67d8c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
APP_NAME=asterisk
PACKAGE=acf-$(APP_NAME)
-VERSION=0.2.0
+VERSION=0.2.1
APP_DIST=\
asterisk* \
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()