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