Commit 0e76d967 authored by HerrHase's avatar HerrHase

adding #10

parent b1ba798f
......@@ -24,6 +24,11 @@ _backup_tar_clean()
{
if [ ! -z $max_age ]; then
# adding slash
if [ ! -n $remote_directory ]; then
remote_directory="${remote_directory}/"
fi
# getting list from remote server
files=($(rsync --list-only -e 'ssh -p '${remote_port}'' ${remote_username}@${remote_host}:${remote_directory} | awk {'print $5'} | grep -P '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z.tar.bz2'))
......@@ -33,7 +38,7 @@ _backup_tar_clean()
done
fi
rm -R ${work_directory}
rm -R -f ${work_directory}
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment