summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clamsmtp-controller.lua7
-rw-r--r--clamsmtp-model.lua8
2 files changed, 8 insertions, 7 deletions
diff --git a/clamsmtp-controller.lua b/clamsmtp-controller.lua
index 6aaddad..3230fb9 100644
--- a/clamsmtp-controller.lua
+++ b/clamsmtp-controller.lua
@@ -1,8 +1,5 @@
module(..., package.seeall)
--- Load libraries
-require("controllerfunctions")
-
default_action = "status"
function status(self)
@@ -10,7 +7,7 @@ function status(self)
end
function startstop(self)
- return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata)
+ return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
function details(self)
@@ -18,5 +15,5 @@ function details(self)
end
function expert(self)
- return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit ClamSMTP Config", "Configuration Set")
+ return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit ClamSMTP Config", "Configuration Set")
end
diff --git a/clamsmtp-model.lua b/clamsmtp-model.lua
index 06e69e6..832b13f 100644
--- a/clamsmtp-model.lua
+++ b/clamsmtp-model.lua
@@ -18,8 +18,12 @@ 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)
+function get_startstop(clientdata)
+ return modelfunctions.get_startstop(processname)
+end
+
+function startstop_service(startstop, action)
+ return modelfunctions.startstop_service(startstop, action)
end
function getstatus()