From fa9b0886ab536c960744056a21435da9d57debfe Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 17 Aug 2021 14:44:18 -0400 Subject: [PATCH] updated binary path and some variables --- restic.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/restic.sh b/restic.sh index c25c3f0..7894a6b 100644 --- a/restic.sh +++ b/restic.sh @@ -22,21 +22,19 @@ echo $$ > ${lockfile} cd $(dirname "$0") git pull > /dev/null -# Duplicacy version update +# restic version update INSTALLED_RESTIC_VERSION=$(restic -h | awk '/VERSION:/{getline; print $1}') -if [ ${LATEST_RESTIC_VERSION} != ${INSTALLED_DUPLICACY_VERSION} ] || [ ! -e '/usr/bin/duplicacy' ]; then +if [ ${LATEST_RESTIC_VERSION} != ${INSTALLED_RESTIC_VERSION} ] || [ ! -e '/usr/bin/restic' ]; then # Determine the Kernel and Architecture KERNEL=$(uname) ARCH=$(uname -m) if [ ${KERNEL} == 'Linux' ]; then if [ ${ARCH} == 'x86_64' ]; then - curl -vL -o /usr/bin/duplicacy https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_linux_x64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 - #https://github.com/restic/restic/releases/download/v0.12.1/restic_0.12.1_freebsd_amd64.bz2 - #curl -vL -o /usr/bin/duplicacy https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_linux_x64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 - chmod +x /usr/bin/duplicacy >> ${LOGFILE} + curl -vL -o /usr/bin/restic https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_linux_x64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 + chmod +x /usr/bin/restic >> ${LOGFILE} elif [ ${ARCH} == 'aarch64' ]; then - curl -vL -o /usr/bin/duplicacy https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_linux_arm64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 - chmod +x /usr/bin/duplicacy >> ${LOGFILE} + curl -vL -o /usr/bin/restic https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_linux_arm64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 + chmod +x /usr/bin/restic >> ${LOGFILE} else echo "Kernel Type: ${KERNEL}" echo "Arch: ${ARCH}" @@ -45,8 +43,8 @@ if [ ${LATEST_RESTIC_VERSION} != ${INSTALLED_DUPLICACY_VERSION} ] || [ ! -e '/us fi elif [ ${KERNEL} == 'FreeBSD' ]; then if [ ${ARCH} == 'amd64' ]; then - curl -vL -o /usr/bin/duplicacy https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_freebsd_x64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 - chmod +x /usr/bin/duplicacy >> ${LOGFILE} + curl -vL -o /usr/bin/restic https://github.com/gilbertchen/duplicacy/releases/download/v${LATEST_RESTIC_VERSION}/duplicacy_freebsd_x64_${LATEST_RESTIC_VERSION} >> ${LOGFILE} 2>&1 + chmod +x /usr/bin/restic >> ${LOGFILE} else echo "Kernel Type: ${KERNEL}" echo "Arch: ${ARCH}"