mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
Update 30-monitoring.sh
This commit is contained in:
@@ -14,27 +14,20 @@ source /config/birdnet.conf 2>/dev/null
|
|||||||
|
|
||||||
# Ensure folder exists
|
# Ensure folder exists
|
||||||
ingest_dir="$RECS_DIR/StreamData"
|
ingest_dir="$RECS_DIR/StreamData"
|
||||||
if [ ! -d "$ingest_dir" ]; then
|
|
||||||
mkdir -p "$ingest_dir"
|
|
||||||
chown -R pi:pi "$ingest_dir"
|
|
||||||
chmod -R 755 "$ingest_dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Other folder if no RTSP STREAM ?
|
# Other folder if no RTSP STREAM ?
|
||||||
if [ -z "${RTSP_STREAM}" ]; then
|
if [ -z "${RTSP_STREAM}" ]; then
|
||||||
ingest_dir="${RECS_DIR}/$(date +"%B-%Y/%d-%A")"
|
ingest_dir="${RECS_DIR}/$(date +"%B-%Y/%d-%A")"
|
||||||
if [ ! -d "$ingest_dir" ]; then
|
|
||||||
mkdir -p "$ingest_dir"
|
|
||||||
chown -R pi:pi "$ingest_dir"
|
|
||||||
chmod -R 755 "$ingest_dir"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ingest_dir="$(readlink -f "$ingest_dir")" || true
|
|
||||||
|
|
||||||
# Check permissions
|
# Check permissions
|
||||||
|
mkdir -p "$ingest_dir"
|
||||||
chown -R pi:pi "$ingest_dir"
|
chown -R pi:pi "$ingest_dir"
|
||||||
chmod -R 777 "$ingest_dir"
|
chmod -R 755 "$ingest_dir"
|
||||||
|
ingest_dir="$(readlink -f "$ingest_dir")" || true
|
||||||
|
mkdir -p "$ingest_dir"
|
||||||
|
chown -R pi:pi "$ingest_dir"
|
||||||
|
chmod -R 755 "$ingest_dir"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
sleep 61
|
sleep 61
|
||||||
|
|||||||
Reference in New Issue
Block a user