From ddd8e0ee6860a9800f1af55653e1062195b94b8c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:58:31 +0200 Subject: [PATCH] fix version check for pocket-id migration (#7298) --- ct/pocketid.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/pocketid.sh b/ct/pocketid.sh index d307a884c8..f8e05fdb1b 100755 --- a/ct/pocketid.sh +++ b/ct/pocketid.sh @@ -30,7 +30,8 @@ function update_script() { fi if check_for_gh_release "pocket-id" "pocket-id/pocket-id"; then - if [[ "$(cat ~/.pocket-id)" < "1.0.0" ]]; then + if [ "$(printf '%s\n%s' "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" "1.0.0" | sort -V | head -n1)" = "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" ] \ + && [ "$(cat ~/.pocket-id 2>/dev/null || echo 0.0.0)" != "1.0.0" ]; then msg_info "Migrating ${APP}" systemctl -q disable --now pocketid-backend pocketid-frontend caddy mv /etc/caddy/Caddyfile ~/Caddyfile.bak