updated binary path and some variables
This commit is contained in:
18
restic.sh
18
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}"
|
||||
|
||||
Reference in New Issue
Block a user