Allow prompt-less install on low-resource systems
This commit is contained in:
parent
bbbdcfb625
commit
5c851f2935
@ -147,40 +147,44 @@ done
|
|||||||
|
|
||||||
MEM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
|
MEM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
|
||||||
|
|
||||||
if [ ${MEM_TOTAL} -le "2621440" ]; then
|
if [ -z "${SKIP_CLAMD}" ]; then
|
||||||
echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations."
|
if [ ${MEM_TOTAL} -le "2621440" ]; then
|
||||||
echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf."
|
echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations."
|
||||||
read -r -p "Do you want to disable ClamAV now? [Y/n] " response
|
echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf."
|
||||||
case $response in
|
read -r -p "Do you want to disable ClamAV now? [Y/n] " response
|
||||||
[nN][oO]|[nN])
|
case $response in
|
||||||
SKIP_CLAMD=n
|
[nN][oO]|[nN])
|
||||||
|
SKIP_CLAMD=n
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SKIP_CLAMD=y
|
||||||
;;
|
;;
|
||||||
*)
|
esac
|
||||||
SKIP_CLAMD=y
|
else
|
||||||
;;
|
SKIP_CLAMD=n
|
||||||
esac
|
fi
|
||||||
else
|
|
||||||
SKIP_CLAMD=n
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${MEM_TOTAL} -le "2097152" ]; then
|
if [ -z "${SKIP_SOLR}" ]; then
|
||||||
echo "Disabling Solr on low-memory system."
|
if [ ${MEM_TOTAL} -le "2097152" ]; then
|
||||||
SKIP_SOLR=y
|
echo "Disabling Solr on low-memory system."
|
||||||
elif [ ${MEM_TOTAL} -le "3670016" ]; then
|
SKIP_SOLR=y
|
||||||
echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations."
|
elif [ ${MEM_TOTAL} -le "3670016" ]; then
|
||||||
echo "Solr is a prone to run OOM and should be monitored. The default Solr heap size is 1024 MiB and should be set in mailcow.conf according to your expected load."
|
echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations."
|
||||||
echo "Solr can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory."
|
echo "Solr is a prone to run OOM and should be monitored. The default Solr heap size is 1024 MiB and should be set in mailcow.conf according to your expected load."
|
||||||
read -r -p "Do you want to disable Solr now? [Y/n] " response
|
echo "Solr can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory."
|
||||||
case $response in
|
read -r -p "Do you want to disable Solr now? [Y/n] " response
|
||||||
[nN][oO]|[nN])
|
case $response in
|
||||||
SKIP_SOLR=n
|
[nN][oO]|[nN])
|
||||||
|
SKIP_SOLR=n
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SKIP_SOLR=y
|
||||||
;;
|
;;
|
||||||
*)
|
esac
|
||||||
SKIP_SOLR=y
|
else
|
||||||
;;
|
SKIP_SOLR=n
|
||||||
esac
|
fi
|
||||||
else
|
|
||||||
SKIP_SOLR=n
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${SKIP_BRANCH} != y ]]; then
|
if [[ ${SKIP_BRANCH} != y ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user