From bb6adcea06e97df7d1f6bd01fe1e7bfa199de4f5 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Wed, 9 Apr 2008 14:04:34 +0000 Subject: Cleaned up code. Added start/stop/restart buttons. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@979 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-model.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tinydns-model.lua') diff --git a/tinydns-model.lua b/tinydns-model.lua index ad83798..3b91cb3 100644 --- a/tinydns-model.lua +++ b/tinydns-model.lua @@ -6,6 +6,7 @@ require("getopts") require("fs") require("format") require("processinfo") +require("daemoncontrol") -- Set variables local configdir @@ -262,6 +263,14 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS +function startstop_service ( self, action ) + local cmd = action.value + local cmdresult,cmdmessage,cmderror,cmdaction = daemoncontrol.daemoncontrol(processname, cmd) + action.descr=cmdmessage + action.errtxt=cmderror + return cmdresult,action +end + function valid_filename(self,path) return validfilename(path) end -- cgit v1.2.3