fix version check for pocket-id migration (#7298)

This commit is contained in:
CanbiZ 2025-08-29 22:58:31 +02:00 committed by GitHub
parent be255263c6
commit ddd8e0ee68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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