summaryrefslogtreecommitdiffstats
path: root/postfix-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'postfix-model.lua')
-rw-r--r--postfix-model.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/postfix-model.lua b/postfix-model.lua
index b4a0863..8676ecd 100644
--- a/postfix-model.lua
+++ b/postfix-model.lua
@@ -20,7 +20,7 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
-- PUBLIC FUNCTIONS
function startstop_service(action)
- return modelfunctions.startstop_service(processname, action)
+ return modelfunctions.startstop_service(processname, action, {"start", "stop", "restart", "reload"})
end
function getstatus()
@@ -28,7 +28,7 @@ function getstatus()
-- Enabled status is unique for postfix
-- Look for pid file stored in queue_directory .. /pid/
- local config = format.parse_ini_file(fs.read_file(baseurl.."main.cf") or "", "")
+ local config = format.parse_ini_file(fs.read_file(baseurl.."main.cf") or "", "") or {}
if config.queue_directory then
local pidfiles = fs.find_files_as_array(".*\.pid", config.queue_directory.."/pid/")
if pidfiles and pidfiles[1] then