mirror of
https://github.com/openwrt/luci.git
synced 2026-08-29 06:22:49 +04:00
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:
committed by
Jo-Philipp Wich
parent
362db10f88
commit
175ae35d87
@@ -19,6 +19,8 @@ function f.handle(self, state, data)
|
||||
if data.crons then
|
||||
fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
|
||||
luci.sys.call("/usr/bin/crontab %q" % cronfile)
|
||||
else
|
||||
fs.writefile(cronfile, "")
|
||||
end
|
||||
end
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user