Fix: auto-detect web root for different installations#5
Merged
Conversation
- Search multiple BirdNET-Pi locations (/BirdNET-Pi, ~/BirdNET-Pi, etc.) - Auto-detect web root from Caddy, nginx, or Apache config - Install i18n to correct location (webroot or homepage folder) - Use sudo for copying to system directories - Update script also syncs latest i18n.js and language files Fixes installation on systems where BirdNET-Pi is not in ~/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
|
Now it works! I have made a new draft of the Swedish translation file sv.json, copied it in and reinstalled, but it is still the old translation. Is this saved somewhere else? I hope to be able to continue working on this tomorrow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The install script failed on systems where BirdNET-Pi is installed in
/BirdNET-Pi/instead of~/BirdNET-Pi/. The browser showed:This happened because the i18n files weren't accessible via the web.
Solution
Updated
install.shandupdate.shto:Search multiple BirdNET-Pi locations:
~/BirdNET-Pi/home/pi/BirdNET-Pi/BirdNET-Pi/opt/BirdNET-PiAuto-detect web root from:
/etc/caddy/Caddyfile)/etc/nginx/sites-enabled/)/etc/apache2/sites-enabled/)Install to correct location:
$WEBROOT/i18n/$BIRDNET_HOME/homepage/i18n/Use sudo for copying to system directories
Testing
Please re-run the installer:
🤖 Generated with Claude Code