Check if /data is writable

This commit is contained in:
Emmanuel Engelhart
2025-11-30 17:37:02 +01:00
committed by Kelson
parent 309d4d01f1
commit 0232f0a95f

View File

@@ -3,6 +3,14 @@
# Download if necessary a file
if [ ! -z "$DOWNLOAD" ]
then
# Check if /data is writable
if [ ! -w /data ]
then
echo "Data directory (mounted) at '/data' is not writable for container user 'user:user', ZIM file can not be written."
exit 1
fi
# Dwonload ZIM file
ZIM=`basename $DOWNLOAD`
wget $DOWNLOAD -O "$ZIM"