From 1e0a80077d0d4b0672fcc7a57d7d197d935ad59d Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 28 Aug 2015 12:19:24 +0200 Subject: havp cron handling - remove more of reinvented wheels No need for this code, already handled by install_cron_job() as well. --- config/havp/havp.inc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'config/havp') 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); } } /* -- cgit v1.2.3