Merge pull request #5804 from Ayowel/feat/unattended-install
Allow prompt-less install on low-resource systems
This commit is contained in:
commit
10077ece31
@ -147,7 +147,8 @@ 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
|
||||||
|
if [ ${MEM_TOTAL} -le "2621440" ]; then
|
||||||
echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations."
|
echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations."
|
||||||
echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf."
|
echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf."
|
||||||
read -r -p "Do you want to disable ClamAV now? [Y/n] " response
|
read -r -p "Do you want to disable ClamAV now? [Y/n] " response
|
||||||
@ -159,14 +160,16 @@ if [ ${MEM_TOTAL} -le "2621440" ]; then
|
|||||||
SKIP_CLAMD=y
|
SKIP_CLAMD=y
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
SKIP_CLAMD=n
|
SKIP_CLAMD=n
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${MEM_TOTAL} -le "2097152" ]; then
|
if [ -z "${SKIP_SOLR}" ]; then
|
||||||
|
if [ ${MEM_TOTAL} -le "2097152" ]; then
|
||||||
echo "Disabling Solr on low-memory system."
|
echo "Disabling Solr on low-memory system."
|
||||||
SKIP_SOLR=y
|
SKIP_SOLR=y
|
||||||
elif [ ${MEM_TOTAL} -le "3670016" ]; then
|
elif [ ${MEM_TOTAL} -le "3670016" ]; then
|
||||||
echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations."
|
echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations."
|
||||||
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 "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 "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 can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory."
|
||||||
@ -179,8 +182,9 @@ elif [ ${MEM_TOTAL} -le "3670016" ]; then
|
|||||||
SKIP_SOLR=y
|
SKIP_SOLR=y
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
SKIP_SOLR=n
|
SKIP_SOLR=n
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${SKIP_BRANCH} != y ]]; then
|
if [[ ${SKIP_BRANCH} != y ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user