adding condition to the birdnet_recording restart
This commit is contained in:
@@ -20,12 +20,14 @@ make_thisrun() {
|
|||||||
make_thisrun &> /dev/null
|
make_thisrun &> /dev/null
|
||||||
if ! diff ${LAST_RUN} ${THIS_RUN};then
|
if ! diff ${LAST_RUN} ${THIS_RUN};then
|
||||||
echo "The birdnet.conf file has changed"
|
echo "The birdnet.conf file has changed"
|
||||||
echo "Reloading services"
|
if grep REC <(diff $LAST_RUN $THIS_RUN);then
|
||||||
cat ${THIS_RUN} > ${LAST_RUN}
|
echo "Recording element changed -- restarting 'birdnet_recording.service'"
|
||||||
sudo systemctl stop birdnet_recording.service
|
sudo systemctl stop birdnet_recording.service
|
||||||
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
||||||
sudo systemctl start birdnet_recording.service
|
sudo systemctl start birdnet_recording.service
|
||||||
fi
|
fi
|
||||||
|
cat ${THIS_RUN} > ${LAST_RUN}
|
||||||
|
fi
|
||||||
|
|
||||||
INCLUDE_LIST="$HOME/BirdNET-Pi/include_species_list.txt"
|
INCLUDE_LIST="$HOME/BirdNET-Pi/include_species_list.txt"
|
||||||
EXCLUDE_LIST="$HOME/BirdNET-Pi/exclude_species_list.txt"
|
EXCLUDE_LIST="$HOME/BirdNET-Pi/exclude_species_list.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user