More general defaults
This commit is contained in:
parent
d5d55b5536
commit
b53938127a
|
@ -21,10 +21,9 @@ sub new {
|
|||
my $self = {};
|
||||
bless $self, $class;
|
||||
|
||||
$self->{basedir} = '/home/hjp/backup';
|
||||
$self->{basedir} = '/backup';
|
||||
$self->{targets} = [
|
||||
{ host => 'localhost', dir => '/home/hjp/test/', },
|
||||
# { host => 'users.wsr.ac.at', dir => '/shares/user', },
|
||||
{ host => 'localhost', dir => '/var/tmp', },
|
||||
];
|
||||
|
||||
return $self;
|
||||
|
@ -181,5 +180,24 @@ sub mkdir_p {
|
|||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
sub basedir {
|
||||
my ($self, $dir) = @_;
|
||||
$self->{basedir} = $dir if defined($dir);
|
||||
return $self->{basedir};
|
||||
}
|
||||
|
||||
sub targets {
|
||||
my ($self, $targets) = @_;
|
||||
$self->{targets} = $targets if defined($targets);
|
||||
return $self->{targets};
|
||||
}
|
||||
|
||||
sub add_target {
|
||||
my ($self, $target) = @_;
|
||||
push @{ $self->{targets} }, $target;
|
||||
return $self->{targets};
|
||||
}
|
||||
|
||||
# vim: tw=0 expandtab
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue