update s3backup adc to disable pushes first
(ref http://sitaramc.github.com/gitolite/doc/3-faq-tips-etc.html#_disabling_write_access_to_take_backups) code from David Bremner via email
This commit is contained in:
parent
78444c2e76
commit
6a51bae400
|
@ -133,5 +133,18 @@ push(@args, $ENV{HOME}) unless ($subcommand eq 'prune');
|
|||
|
||||
push(@args, 's3+http://'.$S3_BUCKET);
|
||||
|
||||
system '/usr/bin/duplicity', @args;
|
||||
my $semaphore=$ENV{HOME}."/.gitolite.down";
|
||||
|
||||
die "$semaphore already exists" if (-f $semaphore);
|
||||
|
||||
eval {
|
||||
open (SEMFD,'>',$semaphore) or die ("failed to open $semaphore");
|
||||
my $now = gmtime();
|
||||
print SEMFD "Repo unavailable due to $subcommand backup started at $now GMT\n";
|
||||
close SEMFD;
|
||||
|
||||
system '/usr/bin/duplicity', @args;
|
||||
|
||||
};
|
||||
|
||||
unlink $semaphore;
|
||||
|
|
Loading…
Reference in a new issue