module(..., package.seeall) -- Load libraries modelfunctions = require("modelfunctions") fs = require("acf.fs") format = require("acf.format") -- Set variables local configfile = "/etc/dovecot/dovecot.conf" local processname = "dovecot" local packagename = "dovecot" local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " -- ################################################################################ -- LOCAL FUNCTIONS -- ################################################################################ -- PUBLIC FUNCTIONS function get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end function startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end function getstatus() return modelfunctions.getstatus(processname, packagename, "Dovecot Status") end function getstatusdetails() return cfe({ type="longtext", value="", label="Dovecot Status Details" }) end function get_filedetails() return modelfunctions.getfiledetails(configfile) end function update_filedetails(self, filedetails) return modelfunctions.setfiledetails(self, filedetails, {configfile}) end