install flickr_labels

This commit is contained in:
frederik
2024-07-13 15:59:16 +02:00
parent 3b5160b789
commit fa1c15ceb8
4 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -44,6 +44,6 @@ cd $my_dir/scripts || exit 1
CURRENT_TIMEZONE=$(timedatectl show --value --property=Timezone) CURRENT_TIMEZONE=$(timedatectl show --value --property=Timezone)
[ -f /etc/timezone ] && echo "$CURRENT_TIMEZONE" | sudo tee /etc/timezone > /dev/null [ -f /etc/timezone ] && echo "$CURRENT_TIMEZONE" | sudo tee /etc/timezone > /dev/null
./install_language_label_nm.sh -l $DATABASE_LANG || exit 1 ./install_language_label.sh || exit 1
exit 0 exit 0
+2 -2
View File
@@ -2,9 +2,9 @@
source /etc/birdnet/birdnet.conf source /etc/birdnet/birdnet.conf
if [ "$MODEL" == "BirdNET_GLOBAL_6K_V2.4_Model_FP16" ]; then if [ "$MODEL" == "BirdNET_GLOBAL_6K_V2.4_Model_FP16" ]; then
BASEDIR=/home/$BIRDNET_USER/BirdNET-Pi/model/labels_nm BASEDIR=labels_nm
else else
BASEDIR=/home/$BIRDNET_USER/BirdNET-Pi/model/labels_l18n BASEDIR=labels_l18n
fi fi
label_file_name="labels_${DATABASE_LANG}.txt" label_file_name="labels_${DATABASE_LANG}.txt"
+1
View File
@@ -82,6 +82,7 @@ create_necessary_dirs() {
sudo -u ${USER} ln -fs $my_dir/templates/phpsysinfo.ini ${HOME}/phpsysinfo/ sudo -u ${USER} ln -fs $my_dir/templates/phpsysinfo.ini ${HOME}/phpsysinfo/
sudo -u ${USER} ln -fs $my_dir/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/ sudo -u ${USER} ln -fs $my_dir/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/
sudo -u ${USER} ln -fs $my_dir/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html sudo -u ${USER} ln -fs $my_dir/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html
sudo -u ${USER} ln -sf $my_dir/model/labels_nm/labels_en.txt $my_dir/model/labels_flickr.txt
chmod -R g+rw $my_dir chmod -R g+rw $my_dir
chmod -R g+rw ${RECS_DIR} chmod -R g+rw ${RECS_DIR}
} }
+7
View File
@@ -208,6 +208,13 @@ AUTH=$(grep basicauth /etc/caddy/Caddyfile)
[ -n "${CADDY_PWD}" ] && [ -z "${AUTH}" ] && sudo /usr/local/bin/update_caddyfile.sh > /dev/null 2>&1 [ -n "${CADDY_PWD}" ] && [ -z "${AUTH}" ] && sudo /usr/local/bin/update_caddyfile.sh > /dev/null 2>&1
set -x set -x
if ! [ -L $HOME/BirdNET-Pi/model/labels_flickr.txt ]; then
sudo_with_user ln -sf labels_nm/labels_en.txt $HOME/BirdNET-Pi/model/labels_flickr.txt
fi
if ! [ -L $HOME/BirdNET-Pi/model/labels.txt ]; then
sudo_with_user install_language_label.sh
fi
# update snippets above # update snippets above
systemctl daemon-reload systemctl daemon-reload