update link

This commit is contained in:
kx1t
2025-03-15 14:21:49 +01:00
parent 728db6d387
commit 8c24959c2b
2 changed files with 4 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ GET_PS_PHOTO () {
local link
if [[ -f "/usr/share/planefence/persist/planepix/cache/$1.jpg" ]]; then
echo "/usr/share/planefence/persist/planepix/cache/$1.jpg"
echo "imgcache/$1.jpg"
return 0
fi
# If we don't have a cache file, let's see if we can get one from PlaneSpotters.net
@@ -183,7 +183,7 @@ GET_PS_PHOTO () {
&& [[ -n "$link" ]]; then
# If we have a link, let's download the photo
curl -ssL --fail "$link" -o "/usr/share/planefence/persist/planepix/cache/$1.jpg"
echo "/usr/share/planefence/persist/planepix/cache/$1.jpg"
echo "imgcache/$1.jpg"
else
# If we don't have a link, let's return an empty string
echo ""

View File

@@ -60,6 +60,8 @@ chmod u=rwx,go=rx \
/usr/share/planefence/html/plane-alert/silhouettes \
/usr/share/planefence/html/scripts
ln -sf /usr/share/planefence/html/scripts /usr/share/planefence/html/plane-alert/scripts
ln -sf /usr/share/planefence/persist/planepix/cache /usr/share/planefence/html/imgcache
chmod a+rx /usr/share/planefence/html/imgcache
if [[ -f /usr/share/planefence/persist/planefence.config ]]; then
set -o allexport
# shellcheck disable=SC1091