Skip to content

Commit

Permalink
Add check and re-creation of /var/cache/unifi-video/{exports|hls}.
Browse files Browse the repository at this point in the history
  • Loading branch information
fryfrog committed Jul 1, 2020
1 parent 85e446c commit 0a1789a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,18 @@ fi

# Loop while we wait for shutdown trap
while true; do
sleep 2
# When --tmpfs is used, container restarts cause these folders to go missing.
# See issue #178 for details.
if [[ ! -d /var/cache/unifi-video/exports ]]; then
echo -n "Re-creating /var/cache/unifi-video/exports... "
mkdir -p /var/cache/unifi-video/exports
echo "done."
fi

if [[ ! -d /var/cache/unifi-video/hls ]]; then
echo -n "Re-creating /var/cache/unifi-video/hls... "
mkdir -p /var/cache/unifi-video/hls
echo "done."
fi
sleep 5
done

0 comments on commit 0a1789a

Please sign in to comment.