From: David Date: Thu, 13 Sep 2018 09:04:54 +0000 (+0200) Subject: fix #1907: cron entry duplicated on disable/enable X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f219b8fd1be6a7779516b67836cb58ee967bf3c4;p=pve-zsync.git fix #1907: cron entry duplicated on disable/enable match the interval in front of the first root Signed-off-by: David --- diff --git a/pve-zsync b/pve-zsync index 10d6bac..bf00c7a 100755 --- a/pve-zsync +++ b/pve-zsync @@ -426,7 +426,7 @@ sub format_job { $text = "#"; } if ($line) { - $line =~ /^#*(.+) root/; + $line =~ /^#*\s*((?:\S+\s+){4}\S+)\s+root/; $text .= $1; } else { $text .= "*/$INTERVAL * * * *";