mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-12-23 22:28:10 -05:00
Check if /data is writable
This commit is contained in:
committed by
Kelson
parent
309d4d01f1
commit
0232f0a95f
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user