aboutsummaryrefslogtreecommitdiffstats
path: root/config/havp
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-08-28 12:19:24 +0200
committerdoktornotor <notordoktor@gmail.com>2015-08-28 12:19:24 +0200
commit1e0a80077d0d4b0672fcc7a57d7d197d935ad59d (patch)
tree44b9f3a28b4c3f9c04ced6c6ce95d719d3ef35a8 /config/havp
parent00027a4857d6897dba2e5d9387be4336005a75aa (diff)
downloadpfsense-packages-1e0a80077d0d4b0672fcc7a57d7d197d935ad59d.tar.gz
pfsense-packages-1e0a80077d0d4b0672fcc7a57d7d197d935ad59d.tar.bz2
pfsense-packages-1e0a80077d0d4b0672fcc7a57d7d197d935ad59d.zip
havp cron handling - remove more of reinvented wheels
No need for this code, already handled by install_cron_job() as well.
Diffstat (limited to 'config/havp')
-rw-r--r--config/havp/havp.inc13
1 files changed, 3 insertions, 10 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 574eb44e..5ecfcc29 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -524,18 +524,11 @@ function havp_reconfigure_cron() {
$on = ($opt[1] !== "");
$crontask = "/usr/bin/nice -n20 " . HVDEF_AVUPD_SCRIPT;
- // Delete old cron task if it exists
- if (is_array($config['cron']['item'])) {
- foreach ($config['cron']['item'] as $item) {
- if (strpos($item['command'], $crontask) !== false) {
- install_cron_job($crontask, false);
- }
- }
- }
-
- // Set new cron task
+ // Set new cron task or remove it if inactive
if ($on === true) {
install_cron_job($crontask, $on, $opt);
+ } else {
+ install_cron_job($crontask, false);
}
}
/*