]> git.proxmox.com Git - pve-zsync.git/commitdiff
fix #1907: cron entry duplicated on disable/enable
authorDavid <d.limbeck@proxmox.com>
Thu, 13 Sep 2018 09:04:54 +0000 (11:04 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 18 Sep 2018 08:07:57 +0000 (10:07 +0200)
match the interval in front of the first root

Signed-off-by: David <d.limbeck@proxmox.com>
pve-zsync

index 10d6bac8bfa6cc355b14e6409148d1a88f4b5f59..bf00c7aaa9446c8d5df400e68cce0e3b33382766 100755 (executable)
--- 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 * * * *";