BirdNET-stream/utils/fix_permissions.sh

22 lines
415 B
Bash
Raw Normal View History

#! /usr/bin/env bash
2022-08-21 06:13:15 +02:00
# Fix permissions on BirdNET-stream files when messed up
set -e
2022-08-21 06:13:15 +02:00
DEBUG=${DEBUG:-0}
debug() {
2022-08-21 06:13:15 +02:00
[ $DEBUG -eq 1 ] && echo "$@"
}
2022-08-21 06:13:15 +02:00
config_filepath="./config/birdnet.conf"
if [ -f "$config_filepath" ]; then
source "$config_filepath"
else
echo "Config file not found: $config_filepath"
exit 1
fi
GROUP=birdnet
sudo chown -R $USER:$GROUP $CHUNK_FOLDER
sudo chmod -R 775 $CHUNK_FOLDER