/[BackupPC]/trunk/bin/BackupPC_incPartsUpdate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_incPartsUpdate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 288 by dpavlin, Wed Dec 14 15:09:17 2005 UTC revision 289 by dpavlin, Wed Jan 18 15:16:31 2006 UTC
# Line 16  use Archive::Tar::Streamed; Line 16  use Archive::Tar::Streamed;
16  use Algorithm::Diff;  use Algorithm::Diff;
17  use Getopt::Std;  use Getopt::Std;
18  use File::Slurp;  use File::Slurp;
19    use File::Pid;
20    
21    my $pid_path = abs_path($0);
22    $pid_path =~ s/\W+/_/g;
23    
24    my $pidfile = new File::Pid({
25            file => "/tmp/$pid_path",
26    });
27    
28    if (my $pid = $pidfile->running ) {
29            die "$0 already running: $pid\n";
30    } elsif ($pidfile->pid ne $$) {
31            $pidfile->remove;
32            $pidfile = new File::Pid;
33    }
34    
35    print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n";
36    $pidfile->write;
37    
38  my $bpc = BackupPC::Lib->new || die "can't create BackupPC::Lib";  my $bpc = BackupPC::Lib->new || die "can't create BackupPC::Lib";
39  my %Conf = $bpc->Conf();  my %Conf = $bpc->Conf();

Legend:
Removed from v.288  
changed lines
  Added in v.289

  ViewVC Help
Powered by ViewVC 1.1.26