delete archive option
This commit is contained in:
parent
0a5f0a27ee
commit
a9aba2cdf4
@ -13,6 +13,9 @@ archive_dir='archives/'
|
||||
mode='archive'
|
||||
#mode='files'
|
||||
|
||||
delete_archive=true
|
||||
#delete_archive=false
|
||||
|
||||
if [ "$mode" == "files" ]; then
|
||||
rsync -a --exclude-from=$exclude_file --password-file=$password_file $source $user@$ip::$destination
|
||||
else
|
||||
@ -26,7 +29,7 @@ else
|
||||
|
||||
rsync -a --exclude-from=$exclude_file --password-file=$password_file $archive_dir/* $user@$ip::$destination
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ $? -eq 0 ] && [ "$delete_archive" = true ]; then
|
||||
rm -f $archive_dir/*
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user