From f664556711a283133063ba51a031905d02cbb052 Mon Sep 17 00:00:00 2001 From: ttrask Date: Tue, 17 Mar 2009 20:39:56 +0000 Subject: Changed the way startstop works in core to add a list of allowed actions. Modified all ACFs that don't use the standard functions to work with new library method. git-svn-id: svn://svn.alpinelinux.org/acf/postfix/trunk@1730 ab2d0c66-481e-0410-8bed-d214d4d58bed --- postfix-model.lua | 4 ++-- 1 file 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 -- cgit v1.2.3