Update 'duplicacy.sh'

This commit is contained in:
2020-07-30 17:22:28 -04:00
parent 3b1b7e0ce8
commit 831599b84a

View File

@@ -12,6 +12,10 @@ fi
trap "rm -f ${lockfile}; exit" INT TERM EXIT
echo $$ > ${lockfile}
# self update
cd $(dirname "$0")
git pull
# Duplicacy version update
LATEST_DUPLICACY_VERSION="2.6.1"
INSTALLED_DUPLICACY_VERSION=$(duplicacy -h | awk '/VERSION:/{getline; print $1}')
@@ -50,6 +54,12 @@ if [ ${LATEST_DUPLICACY_VERSION} != ${INSTALLED_DUPLICACY_VERSION} ]; then
fi
fi
# check if the /.duplicacy/preferences file exists before continuing
if [ -e "/.duplicacy/preferences" ]; then
echo "ERROR: Duplicacy not yet configured. Please refer to readme file"
exit
fi
# run the backup
cd /
duplicacy -verbose -log backup -stats >> ${LOGFILE} 2>&1