From 8cc6e20472fad4e2d50edf757dc68aab83cf32b8 Mon Sep 17 00:00:00 2001 From: akanealw Date: Thu, 30 Nov 2023 20:15:36 -0600 Subject: [PATCH] added check for wrestic binary --- debian/debian-essentials.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/debian-essentials.sh b/debian/debian-essentials.sh index b5d5963..1b1d860 100755 --- a/debian/debian-essentials.sh +++ b/debian/debian-essentials.sh @@ -220,8 +220,11 @@ if [ $isInFile -eq 0 ] echo "Unattended upgrades already configured." fi -# install or update wrestic -curl -sL $(curl -s https://api.github.com/repos/alvaro17f/wrestic/releases/latest | grep browser_download_url | cut -d '"' -f 4) | sudo tar zxf - -C /usr/local/bin --overwrite +# update wrestic +if [[ -f /usr/local/bin/wrestic ]] + then + curl -sL $(curl -s https://api.github.com/repos/alvaro17f/wrestic/releases/latest | grep browser_download_url | cut -d '"' -f 4) | sudo tar zxf - -C /usr/local/bin --overwrite +fi # install cronicle worker if [[ -f /opt/cronicle/conf/config.json ]]