blob: 06e69e636995ccd38a7f07f7822a0af2c464b4d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
module(..., package.seeall)
-- Load libraries
require("modelfunctions")
require("fs")
require("format")
-- Set variables
local configfile = "/etc/clamsmtpd.conf"
local processname = "clamsmtpd"
local packagename = "clamsmtp"
local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
-- ################################################################################
-- LOCAL FUNCTIONS
-- ################################################################################
-- PUBLIC FUNCTIONS
function startstop_service(action)
return modelfunctions.startstop_service(processname, action)
end
function getstatus()
return modelfunctions.getstatus(processname, packagename, "ClamSMTP Status")
end
function getstatusdetails()
return cfe({ type="longtext", value="", label="ClamSMTP Status Details" })
end
function get_filedetails()
return modelfunctions.getfiledetails(configfile)
end
function update_filedetails(filedetails)
return modelfunctions.setfiledetails(filedetails, {configfile})
end
|