#!/usr/bin/env perl

use warnings;
use strict;

my $confdir = '/etc/camp/rsbackup_client';
my $bindir = '/opt/camp/rsbackup/rsbackup_client';
my $transdir = '/opt/camp/transports';
my $crondir = '/etc/cron.d';

# create all the directories
for my $dir in ( $confdir, $bindir, $transdir ) {
   `mkdir -p $dir`;
}

`cp initialize cleanup rsbackup.conf.example $confdir`;
`cp rsync.exclude /etc` unless -f '/etc/rsync.exclude';
`cp rsbackup.cron /etc/cron.d/rsbackup` unless -e '/etc/cron.d/rsbackup';

`cp rsbackup /opt/camp/rsbackup/rsbackup_client`;
`ln -s $bindir/rsbackup /usr/sbin/rsbackup_client`;

#/usr/share
#   man
#   doc
`mkdir -p /opt/camp/transports`;
`cp upload_ftp /opt/camp/transports`;
   upload_http
   sendEmail??

install rsbackup.pm in /opt/camp/rsbackup/
