fix for adsbx links in PF table

This commit is contained in:
kx1t
2025-02-13 06:08:35 -05:00
parent 62075d9553
commit 88f4e1e160

View File

@@ -418,11 +418,11 @@ chk_enabled "$PA_BLUESKY_ENABLED" && [[ -n "$BLUESKY_API" ]] && configure_planea
#
#--------------------------------------------------------------------------------
# Make sure that all past map links follow PA/PF_TRACKS
replacement="${PF_TRACKSERVICE:-${PF_TRACKSVC:-https://globe.adsbexchange.com}}"
replacement="${PF_TRACKSERVICE:-https://globe.adsbexchange.com}"
replacement="${replacement,,}"
if [[ ${replacement::4} != "http" ]]; then replacement="https://$replacement"; fi
shopt -s nullglob
for file in /usr/share/planefence/html/*.csv; do
for file in /usr/share/planefence/html/*.csv; do
sed -i 's|\(http[s]\?://\)[^/]\+[/]\?\(?icao=.*\)|'"$replacement"'/\2|gI' "$file"
done