From 80cfc3b8a558d30acf4f0391a24f0fec035e02a3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:50:01 +0100 Subject: [PATCH] Update trilium.sh --- ct/trilium.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/trilium.sh b/ct/trilium.sh index b9a847da7..83f93a2c3 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -27,10 +27,9 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt - fi - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt fi RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping ${APP}" systemctl stop trilium sleep 1