Skip to content

Commit 2001a43

Browse files
authored
reitti: fix: v4 (#13039)
1 parent d35249b commit 2001a43

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

ct/reitti.sh

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,49 @@ EOF
8989
msg_ok "Started Service"
9090
msg_ok "Updated successfully!"
9191
fi
92+
9293
if check_for_gh_release "photon" "komoot/photon"; then
94+
if [[ -f "$HOME/.photon" ]] && [[ "$(cat "$HOME/.photon")" == 0.7 ]]; then
95+
CURRENT_VERSION="$(<"$HOME/.photon")"
96+
echo
97+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
98+
echo "Photon v1 upgrade detected (breaking change)"
99+
echo
100+
echo "Your current version: $CURRENT_VERSION"
101+
echo
102+
echo "Photon v1 requires a manual migration before updating."
103+
echo
104+
echo "You need to:"
105+
echo " 1. Remove existing geocoding data (not actual reitti data):"
106+
echo " rm -rf /opt/photon_data"
107+
echo
108+
echo " 2. Follow the inial setup guide again:"
109+
echo " https://github.com/community-scripts/ProxmoxVE/discussions/8737"
110+
echo
111+
echo " 3. Re-download and import Photon data for v1"
112+
echo
113+
read -rp "Do you want to continue anyway? (y/N): " CONTINUE
114+
echo
115+
116+
if [[ ! "$CONTINUE" =~ ^[Yy]$ ]]; then
117+
msg_info "Migration required. Update cancelled."
118+
exit 0
119+
fi
120+
121+
msg_warn "Continuing without migration may break Photon in the future!"
122+
fi
123+
93124
msg_info "Stopping Service"
94125
systemctl stop photon
95126
msg_ok "Stopped Service"
96127

97128
rm -f /opt/photon/photon.jar
98-
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon" "singlefile" "latest" "/opt/photon" "photon-0*.jar"
129+
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon" "singlefile" "latest" "/opt/photon" "photon-*.jar"
99130
mv /opt/photon/photon-*.jar /opt/photon/photon.jar
100131

101132
msg_info "Starting Service"
102133
systemctl start photon
134+
systemctl restart nginx
103135
msg_ok "Started Service"
104136
msg_ok "Updated successfully!"
105137
fi

install/reitti-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ msg_ok "Configured RabbitMQ"
4444

4545
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "reitti" "dedicatedcode/reitti" "singlefile" "latest" "/opt/reitti" "reitti-app.jar"
4646
mv /opt/reitti/reitti-*.jar /opt/reitti/reitti.jar
47-
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon" "singlefile" "latest" "/opt/photon" "photon-0*.jar"
47+
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "photon" "komoot/photon" "singlefile" "latest" "/opt/photon" "photon-*.jar"
4848
mv /opt/photon/photon-*.jar /opt/photon/photon.jar
4949

5050
msg_info "Installing Nginx Tile Cache"

0 commit comments

Comments
 (0)