From e9dd4fa661ff5e02f40f80c5a9cfc141adb0667b Mon Sep 17 00:00:00 2001
From: Lee Nave <nave@alum.mit.edu>
Date: Wed, 5 Jun 2024 23:14:22 -0700
Subject: [PATCH] Update jackett.sh

Prevent error if version file doesn't exist
---
 ct/jackett.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ct/jackett.sh b/ct/jackett.sh
index 45984240..278373d0 100644
--- a/ct/jackett.sh
+++ b/ct/jackett.sh
@@ -56,7 +56,7 @@ function update_script() {
 header_info
 if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
-if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
+if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
   msg_info "Updating ${APP}"
   wget -q https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxAMDx64.tar.gz
   systemctl stop jackett