Update 'duplicacy.sh'
This commit is contained in:
10
duplicacy.sh
10
duplicacy.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user