diff --git a/src/etc/config.xml.sample b/src/etc/config.xml.sample index 632f4fee5..8909edb44 100644 --- a/src/etc/config.xml.sample +++ b/src/etc/config.xml.sample @@ -310,44 +310,6 @@ - - - */60 - * - * - * - * - root - /usr/local/sbin/expiretable -v -t 3600 sshlockout - - - 1 - 1 - * - * - * - root - /usr/local/etc/rc.dyndns.update - - - */60 - * - * - * - * - root - /usr/local/sbin/expiretable -v -t 3600 virusprot - - - 30 - 12 - * - * - * - root - /usr/local/etc/rc.update_urltables - - diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index 673699fe2..2c82d91bd 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -2349,10 +2349,16 @@ function configure_cron() '/usr/local/etc/rc.backup_dhcpleases', '/usr/local/etc/rc.backup_netflow', '/usr/local/etc/rc.backup_rrd', + '/usr/local/etc/rc.dyndns.update', '/usr/local/etc/rc.update_bogons', + '/usr/local/etc/rc.update_urltables', '/usr/local/opnsense/scripts/remote_backup.php', + '/usr/local/sbin/expiretable -v -t 3600 sshlockout', + '/usr/local/sbin/expiretable -v -t 3600 virusprot', 'adjkerntz -a', - 'newsyslog', /* old config migration for extra care */ + /* old config migration for extra care: */ + 'checkreload.sh', + 'newsyslog', ); /* @@ -2382,6 +2388,10 @@ function configure_cron() $autocron = array(); $autocron[] = generate_cron_job('adjkerntz -a', '1,31', '0-5'); + $autocron[] = generate_cron_job('/usr/local/sbin/expiretable -v -t 3600 sshlockout', '*/60'); + $autocron[] = generate_cron_job('/usr/local/sbin/expiretable -v -t 3600 virusprot', '*/60'); + $autocron[] = generate_cron_job('/usr/local/etc/rc.dyndns.update', '1', '1'); + $autocron[] = generate_cron_job('/usr/local/etc/rc.update_urltables', '30', '12'); if (!empty($config['system']['rrdbackup'])) { $autocron[] = generate_cron_job('/usr/local/etc/rc.backup_rrd', $minute = '0', '*/' . $config['system']['rrdbackup']); diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index bd9909e09..0f3360a85 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -501,76 +501,6 @@ function upgrade_024_to_025() { unset($config['system']['use_rrd_gateway']); } -function upgrade_025_to_026() -{ - global $config; - $cron_item = array(); - $cron_item['minute'] = "0"; - $cron_item['hour'] = "*"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "newsyslog"; - - $config['cron']['item'][] = $cron_item; - - $cron_item = array(); - $cron_item['minute'] = "1,31"; - $cron_item['hour'] = "0-5"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "adjkerntz -a"; - - $config['cron']['item'][] = $cron_item; - - $cron_item = array(); - $cron_item['minute'] = "1"; - $cron_item['hour'] = "*"; - $cron_item['mday'] = "1"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/etc/rc.update_bogons"; - - $config['cron']['item'][] = $cron_item; - - $cron_item = array(); - $cron_item['minute'] = "*/60"; - $cron_item['hour'] = "*"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/sbin/expiretable -v -t 3600 sshlockout"; - - $config['cron']['item'][] = $cron_item; - - $cron_item = array(); - $cron_item['minute'] = "1"; - $cron_item['hour'] = "1"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/etc/rc.dyndns.update"; - - $config['cron']['item'][] = $cron_item; - - $cron_item = array(); - $cron_item['minute'] = "*/60"; - $cron_item['hour'] = "*"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/sbin/expiretable -v -t 3600 virusprot"; - - $config['cron']['item'][] = $cron_item; -} - function upgrade_028_to_029() { global $config; $rule_item = array(); @@ -584,7 +514,6 @@ function upgrade_028_to_029() { $a_filter[] = $rule_item; } - function upgrade_029_to_030() { global $config; /* enable the rrd config setting by default */ @@ -2504,19 +2433,6 @@ function upgrade_069_to_070() { } } -function upgrade_070_to_071() { - global $config; - - if (is_array($config['cron']['item'])) { - foreach($config['cron']['item'] as $idx => $cronitem) { - if(stristr($cronitem['command'], "checkreload.sh")) { - unset($config['cron']['item'][$idx]); - break; - } - } - } -} - function rename_field(& $section, $oldname, $newname) { if (is_array($section)) { foreach($section as & $item) { @@ -2570,19 +2486,6 @@ function upgrade_074_to_075() { rename_field($config['crl'], 'name', 'descr'); } -function upgrade_075_to_076() { - global $config; - $cron_item = array(); - $cron_item['minute'] = "30"; - $cron_item['hour'] = "12"; - $cron_item['mday'] = "*"; - $cron_item['month'] = "*"; - $cron_item['wday'] = "*"; - $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/etc/rc.update_urltables"; - $config['cron']['item'][] = $cron_item; -} - function upgrade_076_to_077() { global $config; foreach($config['filter']['rule'] as & $rule) {