projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
applications/luci-vnstat: move to status menu
[project/luci.git]
/
modules
/
admin-full
/
luasrc
/
model
/
cbi
/
admin_services
/
crontab.lua
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
b/modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
index
521e0a2
..
2ae5939
100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_services/crontab.lua
@@
-12,21
+12,23
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+
+local fs = require "nixio.fs"
local cronfile = "/etc/crontabs/root"
local cronfile = "/etc/crontabs/root"
-f = SimpleForm("crontab", translate("
a_s_crontab"), translate("a_s_crontab1
"))
+f = SimpleForm("crontab", translate("
Scheduled Tasks"), translate("This is the system crontab in which scheduled tasks can be defined.
"))
t = f:field(TextValue, "crons")
t.rmempty = true
t.rows = 10
function t.cfgvalue()
t = f:field(TextValue, "crons")
t.rmempty = true
t.rows = 10
function t.cfgvalue()
- return
luci.
fs.readfile(cronfile) or ""
+ return fs.readfile(cronfile) or ""
end
function f.handle(self, state, data)
if state == FORM_VALID then
if data.crons then
end
function f.handle(self, state, data)
if state == FORM_VALID then
if data.crons then
-
luci.
fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
+ fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
end
end
return true
end
end
return true