fixing some missing symlinks and file permissions

This commit is contained in:
mcguirepr89
2022-01-31 16:35:57 -05:00
parent cd5a2ed658
commit 0ec02a2239
4 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -29,8 +29,14 @@ fi
INCLUDE_LIST="/home/pi/BirdNET-Pi/include_species_list.txt"
EXCLUDE_LIST="/home/pi/BirdNET-Pi/exclude_species_list.txt"
[ -f ${INCLUDE_LIST} ] || touch ${INCLUDE_LIST}
[ -f ${EXCLUDE_LIST} ] || touch ${EXCLUDE_LIST}
if [ -f ${INCLUDE_LIST} ];then
touch ${INCLUDE_LIST} &&
sudo chmod g+rw ${INCLUDE_LIST}
fi
if [ -f ${EXCLUDE_LIST} ];then
touch ${EXCLUDE_LIST} &&
sudo chmod g+rw ${EXCLUDE_LIST}
fi
if [ "$(du ${INCLUDE_LIST} | awk '{print $1}')" -lt 4 ];then
INCLUDE_LIST=null
fi
+1
View File
@@ -39,6 +39,7 @@ if [ ! -z ${EXTRACTIONLOG_URL} ];then
done
fi
sudo -u ${USER} ln -fs $(dirname ${my_dir})/model/labels.txt ${my_dir}/
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts ${EXTRACTED}
if [ -z ${BIRDNETPI_URL} ];then
sudo -u${USER} sed -i "s/birdnetpi.local/$(hostname).local/g" $(dirname ${my_dir})/homepage/*.html
+1
View File
@@ -142,6 +142,7 @@ create_necessary_dirs() {
done
fi
sudo -u ${USER} ln -fs $(dirname ${my_dir})/model/labels.txt ${my_dir}/
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts ${EXTRACTED}
if [ -z ${BIRDNETPI_URL} ];then
sudo -u${USER} sed -i "s/birdnetpi.local/$(hostname).local/g" $(dirname ${my_dir})/homepage/*.html
+1
View File
@@ -130,6 +130,7 @@ create_necessary_dirs() {
done
fi
sudo -u ${USER} ln -fs $(dirname ${my_dir})/model/labels.txt ${my_dir}/
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts ${EXTRACTED}
if [ -z ${BIRDNETPI_URL} ];then
sudo -u${USER} sed -i "s/birdnetpi.local/$(hostname).local/g" $(dirname ${my_dir})/homepage/*.html