Serve collage at http://birdnet.local/ (replaces stock index)

install_services.sh now symlinks five frontend files (index.html,
styles.css, apt.js, masks.json, dims.json) from avian/frontend/ into
the Caddy site root. Caddy serves index.html before index.php, so /
shows the collage and BirdNET-Pi's stock UI moves to /index.php
(still linked from the menu drawer).

API shims stay under /avian/api/. apt.js fetches them with
./avian/api/birdnet-api.php?action=X now that the frontend lives at
root instead of /avian/frontend/.

avian/index.html redirect file removed (no longer needed - / serves
the collage directly).

README + menu drawer updated to reflect / as the entry point and
/index.php as the stock-UI link.

Verified in Docker:
  /                        200 text/html (collage, 4 tiles)
  /masks.json              200 (276 KB)
  /avian/api/...           200 (all PHP shims working)
  Caddy serves index.html as default index, index.php still reachable
This commit is contained in:
Twarner491
2026-05-28 12:07:27 -07:00
parent 65ac7efef4
commit b2027fed2c
6 changed files with 42 additions and 35 deletions
+14 -2
View File
@@ -69,8 +69,20 @@ create_necessary_dirs() {
sudo -u ${USER} ln -fs $my_dir/include_species_list.txt $my_dir/scripts
sudo -u ${USER} ln -fs $my_dir/whitelist_species_list.txt $my_dir/scripts
sudo -u ${USER} ln -fs $my_dir/homepage/* ${EXTRACTED}
# AvianVisitors overlay — served at http://birdnet.local/avian/
[ -d $my_dir/avian ] && sudo -u ${USER} ln -fs $my_dir/avian ${EXTRACTED}/avian
# AvianVisitors overlay. The avian/ symlink keeps assets + PHP shims
# reachable at /avian/. The five frontend files at the EXTRACTED root
# make the collage the default index for http://birdnet.local/ -
# Caddy serves index.html before index.php, so BirdNET-Pi's stock UI
# moves to http://birdnet.local/index.php (still linked from the
# AvianVisitors menu drawer).
if [ -d $my_dir/avian ]; then
sudo -u ${USER} ln -fs $my_dir/avian ${EXTRACTED}/avian
sudo -u ${USER} ln -fs $my_dir/avian/frontend/index.html ${EXTRACTED}/index.html
sudo -u ${USER} ln -fs $my_dir/avian/frontend/styles.css ${EXTRACTED}/styles.css
sudo -u ${USER} ln -fs $my_dir/avian/frontend/apt.js ${EXTRACTED}/apt.js
sudo -u ${USER} ln -fs $my_dir/avian/frontend/masks.json ${EXTRACTED}/masks.json
sudo -u ${USER} ln -fs $my_dir/avian/frontend/dims.json ${EXTRACTED}/dims.json
fi
sudo -u ${USER} ln -fs $my_dir/model/labels.txt ${my_dir}/scripts
sudo -u ${USER} ln -fs $my_dir/scripts ${EXTRACTED}
sudo -u ${USER} ln -fs $my_dir/scripts/play.php ${EXTRACTED}