Merge 1bf872badd
into 70784cb3b2
This commit is contained in:
commit
6539a947bb
@ -47,6 +47,7 @@ autoupdater_util.randomseed()
|
|||||||
local minute = math.random(0, 59)
|
local minute = math.random(0, 59)
|
||||||
|
|
||||||
local f = io.open('/usr/lib/micron.d/autoupdater', 'w')
|
local f = io.open('/usr/lib/micron.d/autoupdater', 'w')
|
||||||
f:write(string.format('%i 4 * * * /usr/sbin/autoupdater\n', minute))
|
f:write(string.format('%i 4 * * * [ "$(uci -q get autoupdater.settings.delay)" == "1" ] && /usr/sbin/autoupdater --fallback || /usr/sbin/autoupdater\n', minute))
|
||||||
f:write(string.format('%i 0-3,5-23 * * * /usr/sbin/autoupdater --fallback\n', minute))
|
f:write(string.format('%i 5 * * * [ "$(uci -q get autoupdater.settings.delay)" == "1" ] && /usr/sbin/autoupdater || /usr/sbin/autoupdater --fallback\n', minute))
|
||||||
|
f:write(string.format('%i 0-3,6-23 * * * /usr/sbin/autoupdater --fallback\n', minute))
|
||||||
f:close()
|
f:close()
|
||||||
|
@ -18,3 +18,15 @@ msgstr "Branch"
|
|||||||
|
|
||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
msgstr "Aktivieren"
|
msgstr "Aktivieren"
|
||||||
|
|
||||||
|
msgid "Delay"
|
||||||
|
msgstr "Verzögerung"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"You can delay the regular autoupdate for about an hour. This may be useful "
|
||||||
|
"if using the PoE passthrough for powering another node."
|
||||||
|
|
||||||
|
msgstr ""
|
||||||
|
"Du kannst das reguläre automatische Update um eine Stunde verzögern. Dies "
|
||||||
|
"kann hilfreich sein, wenn du PoE-Passthrough nutzt, um einen weiteren Knoten "
|
||||||
|
"zu versorgen."
|
||||||
|
@ -18,3 +18,12 @@ msgstr "Branche"
|
|||||||
|
|
||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
msgstr "Activer"
|
msgstr "Activer"
|
||||||
|
|
||||||
|
msgid "Delay"
|
||||||
|
msgstr "Retard"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"You can delay the regular autoupdate for about an hour. This may be useful "
|
||||||
|
"if using the PoE passthrough for powering another node."
|
||||||
|
|
||||||
|
msgstr ""
|
||||||
|
@ -9,3 +9,12 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Enable"
|
msgid "Enable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Delay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"You can delay the regular autoupdate for about an hour. This may be useful "
|
||||||
|
"if using the PoE passthrough for powering another node."
|
||||||
|
|
||||||
|
msgstr ""
|
||||||
|
@ -32,6 +32,15 @@ function o:write(data)
|
|||||||
uci:set("autoupdater", autoupdater, "branch", data)
|
uci:set("autoupdater", autoupdater, "branch", data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
o = s:option(Flag, "delay", translate("Delay"), translate(
|
||||||
|
"You can delay the regular autoupdate for about an hour. This may " ..
|
||||||
|
"be useful if using the PoE passthrough for powering another node."
|
||||||
|
))
|
||||||
|
o.default = uci:get_bool("autoupdater", autoupdater, "delay")
|
||||||
|
function o:write(data)
|
||||||
|
uci:set("autoupdater", autoupdater, "delay", data)
|
||||||
|
end
|
||||||
|
|
||||||
function f:write()
|
function f:write()
|
||||||
uci:commit("autoupdater")
|
uci:commit("autoupdater")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user