mirror of
https://github.com/webmin/webmin.git
synced 2026-09-13 17:10:38 +01:00
Make default uptime time random
This commit is contained in:
@@ -74,3 +74,4 @@ The nice level (CPU priority) of all cron and other background jobs run by Webmi
|
||||
---- Changes since 1.400 ----
|
||||
Use the gzip -d command to extract Webmin modules, if gunzip is missing (such as on Windows).
|
||||
Users with too many failed logins can be locked until the administrator unlocks them.
|
||||
The default scheduled update time is now randomly selected.
|
||||
|
||||
@@ -2,6 +2,5 @@ update=0
|
||||
upmissing=0
|
||||
upshow=1
|
||||
updays=1
|
||||
uphour=3
|
||||
cron_mode=0
|
||||
osdn=1
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
|
||||
require 'webmin-lib.pl';
|
||||
|
||||
# Update cache of which module's underlying servers are installed
|
||||
sub module_install
|
||||
{
|
||||
# Update cache of which module's underlying servers are installed
|
||||
&build_installed_modules();
|
||||
|
||||
# Pick a random update time
|
||||
if (!defined($config{'uphour'})) {
|
||||
&seed_random();
|
||||
$config{'uphour'} = int(rand()*24);
|
||||
$config{'upmins'} = int(rand()*60);
|
||||
&save_module_config();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user