From 8b37e27f70bd085886f65ad1aa0785a2d27da7ea Mon Sep 17 00:00:00 2001 From: Squidly271 Date: Sun, 8 Oct 2017 12:57:01 -0400 Subject: [PATCH] Prevent cron error entering syslog. If parity check schedule is set to 1st week, 2nd week, etc a cron error is logged when when not on the selected week due to return value of 1 from the date check. Return a value of zero instead. --- plugins/dynamix/include/update.parity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix/include/update.parity.php b/plugins/dynamix/include/update.parity.php index 17cff2aa0..e5c38559a 100644 --- a/plugins/dynamix/include/update.parity.php +++ b/plugins/dynamix/include/update.parity.php @@ -50,7 +50,7 @@ if (isset($_POST['#apply'])) { $month = isset($_POST['month']) ? $_POST['month'] : '*'; $day = isset($_POST['day']) ? $_POST['day'] : '*'; $write = isset($_POST['write']) ? $_POST['write'] : ''; - $cron = "# Generated parity check schedule:\n$time $dotm $month $day $term/usr/local/sbin/mdcmd check $write &> /dev/null\n\n"; + $cron = "# Generated parity check schedule:\n$time $dotm $month $day $term/usr/local/sbin/mdcmd check $write &> /dev/null || :\n\n"; } parse_cron_cfg("dynamix", "parity-check", $cron); @unlink($memory); @@ -58,4 +58,4 @@ if (isset($_POST['#apply'])) { file_put_contents($memory, http_build_query($_POST)); $save = false; } -?> \ No newline at end of file +?>