mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
system: upper half for #2876
This commit is contained in:
parent
3831ea06a0
commit
7b2b072449
@ -176,7 +176,7 @@ function core_cron()
|
||||
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/ping_hosts.sh', '*/4');
|
||||
|
||||
if (!empty($config['system']['rrdbackup'])) {
|
||||
if (!empty($config['system']['rrdbackup']) && $config['system']['rrdbackup'] > 0) {
|
||||
$jobs[]['autocron'] = array(
|
||||
'/usr/local/etc/rc.syshook.d/backup/20-rrd',
|
||||
'0',
|
||||
@ -184,7 +184,7 @@ function core_cron()
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($config['system']['dhcpbackup'])) {
|
||||
if (!empty($config['system']['dhcpbackup']) && $config['system']['dhcpbackup'] > 0) {
|
||||
$jobs[]['autocron'] = array(
|
||||
'/usr/local/etc/rc.syshook.d/backup/20-dhcpleases',
|
||||
'0',
|
||||
@ -192,7 +192,7 @@ function core_cron()
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($config['system']['netflowbackup'])) {
|
||||
if (!empty($config['system']['netflowbackup']) && $config['system']['netflowbackup'] > 0) {
|
||||
$jobs[]['autocron'] = array(
|
||||
'/usr/local/etc/rc.syshook.d/backup/20-netflow',
|
||||
'0',
|
||||
@ -200,7 +200,7 @@ function core_cron()
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($config['system']['captiveportalbackup'])) {
|
||||
if (!empty($config['system']['captiveportalbackup']) && $config['system']['captiveportalbackup'] > 0) {
|
||||
$jobs[]['autocron'] = array(
|
||||
'/usr/local/etc/rc.syshook.d/backup/20-captiveportal',
|
||||
'0',
|
||||
|
||||
@ -334,14 +334,13 @@ include("head.inc");
|
||||
<td><a id="help_for_rrdbackup" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Periodic RRD Backup");?></td>
|
||||
<td>
|
||||
<select name="rrdbackup" class="selectpicker" data-style="btn-default" id="rrdbackup">
|
||||
<option value='0' <?=!$pconfig['rrdbackup'] == 0 ? 'selected="selected"' : ''; ?>><?=gettext("Disabled"); ?></option>
|
||||
<?php
|
||||
for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value='0' <?=!$pconfig['rrdbackup'] == 0 ? 'selected="selected"' : '' ?>><?= gettext('Power off') ?></option>
|
||||
<?php for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value="<?= $x ?>" <?= $pconfig['rrdbackup'] == $x ? 'selected="selected"' : ''; ?>>
|
||||
<?= $x == 1 ? gettext('1 hour') : sprintf(gettext('%s hours'), $x) ?>
|
||||
</option>
|
||||
<?php
|
||||
endfor; ?>
|
||||
<?php endfor ?>
|
||||
<option value='-1' <?=!$pconfig['rrdbackup'] == -1 ? 'selected="selected"' : '' ?>><?=gettext('Disabled') ?></option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="hidden" data-for="help_for_rrdbackup">
|
||||
@ -353,14 +352,13 @@ include("head.inc");
|
||||
<td><a id="help_for_dhcpbackup" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Periodic DHCP Leases Backup");?></td>
|
||||
<td>
|
||||
<select name="dhcpbackup" class="selectpicker" data-style="btn-default" id="dhcpbackup">
|
||||
<option value='0' <?= $pconfig['dhcpbackup'] == 0 ? "selected='selected'" : ''; ?>><?=gettext('Disabled'); ?></option>
|
||||
<?php
|
||||
for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value='0' <?= $pconfig['dhcpbackup'] == 0 ? "selected='selected'" : '' ?>><?= gettext('Power off') ?></option>
|
||||
<?php for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value="<?= $x ?>" <?= $pconfig['dhcpbackup'] == $x ? 'selected="selected"' : '';?>>
|
||||
<?= $x == 1 ? gettext('1 hour') : sprintf(gettext('%s hours'), $x) ?>
|
||||
</option>
|
||||
<?php
|
||||
endfor; ?>
|
||||
<?php endfor ?>
|
||||
<option value='-1' <?= $pconfig['dhcpbackup'] == -1 ? "selected='selected'" : '' ?>><?= gettext('Disabled') ?></option>
|
||||
</select>
|
||||
<div class="hidden" data-for="help_for_dhcpbackup">
|
||||
<?=gettext("This will periodically backup the DHCP leases data so it can be restored automatically on the next boot.");?>
|
||||
@ -371,14 +369,13 @@ include("head.inc");
|
||||
<td><a id="help_for_netflowbackup" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Periodic NetFlow Backup");?></td>
|
||||
<td>
|
||||
<select name="netflowbackup" class="selectpicker" data-style="btn-default" id="netflowbackup">
|
||||
<option value='0' <?= $pconfig['netflowbackup'] == 0 ? 'selected="selected"' : ''; ?>><?=gettext('Disabled'); ?></option>
|
||||
<?php
|
||||
for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value='0' <?= $pconfig['netflowbackup'] == 0 ? 'selected="selected"' : '' ?>><?= gettext('Power off') ?></option>
|
||||
<?php for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value="<?= $x ?>" <?= $pconfig['netflowbackup'] == $x ? 'selected="selected"' : '';?>>
|
||||
<?= $x == 1 ? gettext('1 hour') : sprintf(gettext('%s hours'), $x) ?>
|
||||
</option>
|
||||
<?php
|
||||
endfor; ?>
|
||||
<?php endfor ?>
|
||||
<option value='-1' <?= $pconfig['netflowbackup'] == -1 ? 'selected="selected"' : '' ?>><?= gettext('Disabled') ?></option>
|
||||
</select>
|
||||
<div class="hidden" data-for="help_for_netflowbackup">
|
||||
<?=gettext("This will periodically backup the NetFlow data aggregation so it can be restored automatically on the next boot.");?>
|
||||
@ -389,14 +386,13 @@ include("head.inc");
|
||||
<td><a id="help_for_captiveportalbackup" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Periodic Captive Portal Backup");?></td>
|
||||
<td>
|
||||
<select name="captiveportalbackup" class="selectpicker" data-style="btn-default" id="captiveportalbackup">
|
||||
<option value='0' <?= $pconfig['captiveportalbackup'] == 0 ? 'selected="selected"' : ''; ?>><?=gettext('Disabled'); ?></option>
|
||||
<?php
|
||||
for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value='0' <?= $pconfig['captiveportalbackup'] == 0 ? 'selected="selected"' : '' ?>><?= gettext('Power off') ?></option>
|
||||
<?php for ($x = 1; $x <= 24; $x++): ?>
|
||||
<option value="<?= $x ?>" <?= $pconfig['captiveportalbackup'] == $x ? 'selected="selected"' : '';?>>
|
||||
<?= $x == 1 ? gettext('1 hour') : sprintf(gettext('%s hours'), $x) ?>
|
||||
</option>
|
||||
<?php
|
||||
endfor; ?>
|
||||
<?php endfor ?>
|
||||
<option value='-1' <?= $pconfig['captiveportalbackup'] == -1 ? 'selected="selected"' : '' ?>><?= gettext('Disabled') ?></option>
|
||||
</select>
|
||||
<div class="hidden" data-for="help_for_captiveportalbackup">
|
||||
<?=gettext("This will periodically backup the captive portal session data so it can be restored automatically on the next boot.");?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user