# HG changeset patch # User Matthias Förste # Date 1486999506 -3600 # Node ID 924723fc873ea65566552491be7df94b96a74521 # Parent 7debeb182289c14b3626c2abbf01e7d568e0cb6c made rsync args an argument because users wants to keep mtimes; updated copyright years diff -r 7debeb182289 -r 924723fc873e debian/copyright --- a/debian/copyright Thu Dec 03 10:40:51 2015 +0100 +++ b/debian/copyright Mon Feb 13 16:25:06 2017 +0100 @@ -12,7 +12,7 @@ Copyright: - Copyright (C) 2012-2015 Matthias Förste + Copyright (C) 2012-2017 Matthias Förste License: @@ -34,6 +34,6 @@ The Debian packaging is: - Copyright (C) 2012-2015 Matthias Förste + Copyright (C) 2012-2017 Matthias Förste and is licensed under the GPL version 3, see above. diff -r 7debeb182289 -r 924723fc873e wgnd-watch.pl --- a/wgnd-watch.pl Thu Dec 03 10:40:51 2015 +0100 +++ b/wgnd-watch.pl Mon Feb 13 16:25:06 2017 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/perl -# Copyright (C) 2012-2015 Matthias Förste +# Copyright (C) 2012-2017 Matthias Förste # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -61,13 +61,17 @@ my %opts = ( daemon => 1, map => 'wgnd-watch.map.pl', - pidfile => '/var/run/wgnd-watch.pid' + pidfile => '/var/run/wgnd-watch.pid', + 'rsync-args' => [ qw(-ihv -aAX --no-times) ], + 'rsync-cmd' => '/usr/bin/rsync' ); GetOptions( "map=s" => \$opts{map}, "daemon!" => \$opts{daemon}, "pidfile=s" => \$opts{pidfile}, + "rsync-args=s@" => \$opts{'rsync-args'}, + "rsync-cmd=s" => \$opts{'rsync-cmd'}, "h|help!" => sub { pod2usage(-verbose => 0, -exitval => 0) }, "m|man!" => sub { pod2usage( @@ -110,7 +114,7 @@ my $inotify = new Linux::Inotify2 or die "Can't create new inotify object: $!\n"; -my @rsync = qw(/usr/bin/rsync -ihv -aAX); +my @rsync = ($opts{'rsync-cmd'}, @{$opts{'rsync-args'}}); for (keys %{$source}) { @@ -198,6 +202,19 @@ Location of the pid file. This is ignored unless we are running as a daemon. Defaults to F. +=item B<--pidfile> I + +Location of the pid file. This is ignored unless we are running as a daemon. +Defaults to F. + +=item B<--rsync-args> I + +Arguments to pass to the rsync command. May be given multiple times. Defaults to B<-ihv -aAX --no-times>. + +=item B<--rsync-cmd> I + +Rsync Command. Defaults to F. + =back =head1 FILES