Create savestreamdata

This commit is contained in:
Alexandre
2024-05-01 15:50:34 +02:00
committed by GitHub
parent 261db13891
commit f894721bf3

View File

@@ -0,0 +1,14 @@
#!/usr/bin/bashio
bashio::log.fatal "Container stopping, saving temporary files"
# Stop the services in parallel
systemctl stop bridnet_analysis &
systemctl stop bridnet_recording
wait 1
# Check if there are files in /tmp/StreamData and move them to /data/StreamData
if [ "$(ls -A /tmp/StreamData)" ]; then
cp -rnf /tmp/StreamData/* /data/StreamData/
fi
bashio::log.fatal "... files safe, allowing container to stop"