only place warning if not already present

This commit is contained in:
Matthias Wirth
2020-11-01 21:51:57 +01:00
parent 4945260b68
commit e44b8d383b

View File

@@ -364,7 +364,7 @@ then
echo "Disabling compress.cache-dir in /etc/lighttpd/lighttpd.conf due to often causing full disk issues when compression for filetype application/json is enabled."
echo -----
sed -i -e 's$^compress.cache-dir.*$#\0 # disabled by tar1090, often causes full disk$' /etc/lighttpd/lighttpd.conf
else
elif ! grep -qs -e 'full disk when using tar1090' /etc/lighttpd/lighttpd.conf; then
sed -i -e 's$^compress.cache-dir.*$# CAUTION, enabling cache-dir and filetype json will cause full disk when using tar1090\n\0$' /etc/lighttpd/lighttpd.conf
fi
fi