Added: Cumulative parity check

This commit is contained in:
bergware
2021-12-16 19:16:13 +01:00
parent e832b02233
commit 7cb3876668
+1 -1
View File
@@ -67,7 +67,7 @@ if (isset($_POST['#apply'])) {
[$m, $h] = explode(' ',$time);
$h = ($h + $_POST['duration']) % 24;
if ($_POST['frequency']==7) {
$test = '[[ $(((($(date +%s)-$(grep -Pom1 "^sbSynced=\K\d+" /proc/mdstat))/86400)%7)) -eq 0 ]] && ';
$test = '[[ $(((($(date +%s)-$(grep -Pom1 "^sbSynced=\K.*" /proc/mdstat))/86400)%7)) -eq 0 ]] && ';
$end1 = ' || :';
}
$cron[] = "$m $h * * * $parity pause &> /dev/null";