mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-19 02:58:11 +01:00
Create savestreamdata
This commit is contained in:
14
birdnet-pi/rootfs/etc/cont-finish.d/savestreamdata
Normal file
14
birdnet-pi/rootfs/etc/cont-finish.d/savestreamdata
Normal 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"
|
||||
Reference in New Issue
Block a user