luci-mod-admin-full: allow writing empty crontab config
Write an empty crontab file to remove all content from file /etc/crontabs/root Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
This commit is contained in:
parent
f1190e2d07
commit
53b75d4562
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ function f.handle(self, state, data)
|
||||||
if data.crons then
|
if data.crons then
|
||||||
fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
|
fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
|
||||||
luci.sys.call("/usr/bin/crontab %q" % cronfile)
|
luci.sys.call("/usr/bin/crontab %q" % cronfile)
|
||||||
|
else
|
||||||
|
fs.writefile(cronfile, "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue