blob: 7dbf9941a11e08e4d51e948a492b5dbdfc4704f4 (
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
|
module(..., package.seeall)
-- Load libraries
require("modelfunctions")
-- Set variables
local configfile = "/etc/chrony/chrony.conf"
local processname = "chronyd"
local packagename = "chrony"
-- ################################################################################
-- LOCAL FUNCTIONS
-- ################################################################################
-- PUBLIC FUNCTIONS
function startstop_service(action)
return modelfunctions.startstop_service(processname, action)
end
function getstatus()
return modelfunctions.getstatus(processname, packagename, "Chrony Status")
end
function gettime()
return cfe({ value=os.date(), label="Current time" })
end
function get_filedetails()
-- FIXME validate
return modelfunctions.getfiledetails(configfile)
end
function update_filedetails(filedetails)
-- FIXME validate
return modelfunctions.setfiledetails(filedetails, {configfile})
end
|