summaryrefslogtreecommitdiffstats
path: root/openvpn-model.lua
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2007-11-23 10:43:49 +0000
committerMika Havela <mika.havela@gmail.com>2007-11-23 10:43:49 +0000
commitc6ceb72038d970ba894b4d54cd76e157715a07c4 (patch)
tree61caee9ec17001678d9bea4ee72436b22c2897bb /openvpn-model.lua
parent16f826ca681da9f026c5fa8e9cf5347d28bd062c (diff)
downloadacf-openvpn-c6ceb72038d970ba894b4d54cd76e157715a07c4.tar.bz2
acf-openvpn-c6ceb72038d970ba894b4d54cd76e157715a07c4.tar.xz
Hmm...
git-svn-id: svn://svn.alpinelinux.org/acf/openvpn/trunk@360 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openvpn-model.lua')
-rw-r--r--openvpn-model.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/openvpn-model.lua b/openvpn-model.lua
index bcae88c..15c791c 100644
--- a/openvpn-model.lua
+++ b/openvpn-model.lua
@@ -208,10 +208,24 @@ end
function get_logfile( self, path)
local logcontent = {}
config = config_content ( path )
- local logfilecontent = fs.read_file_as_array ( config.log )
- return logfilecontent
+ local logfilecontent = fs.read_file ( config.log )
+ if not (logfilecontent) then
+ logfilecontent = "File is empty or missing!"
+ end
+ return ( { name = config.log, value = logfilecontent } )
end
+function get_config( self, path)
+ local logcontent = {}
+ config = config_content ( path )
+ local logfilecontent = fs.read_file ( config.name )
+ if not (logfilecontent) then
+ logfilecontent = "File is empty or missing!"
+ end
+ return ( { name = config.name, value = logfilecontent } )
+end
+
+
function get_conflist ()
local configlist = {}
for k,v in pairs(list_conffiles()) do