in reply to Rsync Script

It seems that all you need is a small program that first checks if there's already a copy of itself running, and exits if this is true. And if no copy is running, you call rsync. Something like:
use Fcntl ':all'; my $lock = "/var/lock/whatever"; sysopen my $f, $lock, O_WRONLY | O_CREAT, 0644 or die; flock $f, LOCK_EX | LOCK_NB or exit; system 'rsync', ....; __END__

Replies are listed 'Best First'.
Re^2: Rsync Script
by Anonymous Monk on Aug 18, 2008 at 18:37 UTC
    Thanks, but how will that allow for multiple copies to run at the same time or for multiple threads?