Update 'duplicacy.sh'
This commit is contained in:
33
duplicacy.sh
33
duplicacy.sh
@@ -12,6 +12,39 @@ fi
|
||||
trap "rm -f ${lockfile}; exit" INT TERM EXIT
|
||||
echo $$ > ${lockfile}
|
||||
|
||||
# Determine the Kernel and Architecture
|
||||
KERNEL=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
if [${KERNEL} == 'Linux']; then
|
||||
if [ ${ARCH} == 'x86_64' ]; then
|
||||
cp -v $(dirname "$0")/binaries/duplicacy_linux_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||
chown +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||
elif [ ${ARCH} == 'aarch64' ]; then
|
||||
cp -v $(dirname "$0")/binaries/duplicacy_linux_arm64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||
chown +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||
else
|
||||
echo "Kernel Type: ${KERNEL}"
|
||||
echo "Arch: ${ARCH}"
|
||||
echo "Arch not supported."
|
||||
exit
|
||||
fi
|
||||
elif [${KERNEL} == 'FreeBSD']; then
|
||||
if [ ${ARCH} == 'amd64' ]; then
|
||||
cp -v $(dirname "$0")/binaries/duplicacy_freebsd_x64_2.6.1 /usr/bin/duplicacy >> ${LOGFILE}
|
||||
chown +x /usr/bin/duplicacy >> ${LOGFILE}
|
||||
else
|
||||
echo "Kernel Type: ${KERNEL}"
|
||||
echo "Arch: ${ARCH}"
|
||||
echo "Arch not supported."
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo "Kernel Type: ${KERNEL}"
|
||||
echo "Arch: ${ARCH}"
|
||||
echo "Kernel not supported."
|
||||
exit
|
||||
fi
|
||||
|
||||
# run the backup
|
||||
cd /
|
||||
duplicacy -verbose -log backup -stats >> ${LOGFILE} 2>&1
|
||||
|
||||
Reference in New Issue
Block a user