summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--postgresql-controller.lua2
-rw-r--r--postgresql-model.lua12
l---------postgresql-startstop-html.lsp1
3 files changed, 9 insertions, 6 deletions
diff --git a/postgresql-controller.lua b/postgresql-controller.lua
index e7c6d13..83f2a05 100644
--- a/postgresql-controller.lua
+++ b/postgresql-controller.lua
@@ -15,7 +15,7 @@ function status(self)
end
function startstop(self)
- return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata)
+ return controllerfunctions.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
function details(self)
diff --git a/postgresql-model.lua b/postgresql-model.lua
index dc73d90..690802d 100644
--- a/postgresql-model.lua
+++ b/postgresql-model.lua
@@ -2,8 +2,8 @@ module(..., package.seeall)
-- Load libraries
require("modelfunctions")
-require("fs")
-require("format")
+fs = require("acf.fs")
+format = require("acf.format")
-- Set variables
local confdfile = "/etc/conf.d/postgresql"
@@ -34,8 +34,12 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-function startstop_service(action)
- return modelfunctions.startstop_service(processname, action, {"Setup", "Start", "Stop", "Restart"})
+function get_startstop(clientdata)
+ return modelfunctions.get_startstop(processname)
+end
+
+function startstop_service(startstop, action)
+ return modelfunctions.startstop_service(startstop, action)
end
function getstatus()
diff --git a/postgresql-startstop-html.lsp b/postgresql-startstop-html.lsp
deleted file mode 120000
index 0ea2627..0000000
--- a/postgresql-startstop-html.lsp
+++ /dev/null
@@ -1 +0,0 @@
-../startstop-html.lsp \ No newline at end of file