Skip to content

Commit

Permalink
added logic for update.sh & generate for Flatcurve
Browse files Browse the repository at this point in the history
  • Loading branch information
DerLinkman committed Jun 24, 2024
1 parent 6769751 commit 2c50c18
Show file tree
Hide file tree
Showing 2 changed files with 413 additions and 26 deletions.
37 changes: 12 additions & 25 deletions generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,6 @@ else
SKIP_CLAMD=n
fi

if [ ${MEM_TOTAL} -le "2097152" ]; then
echo "Disabling Solr on low-memory system."
SKIP_SOLR=y
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 "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."
read -r -p "Do you want to disable Solr now? [Y/n] " response
case $response in
[nN][oO]|[nN])
SKIP_SOLR=n
;;
*)
SKIP_SOLR=y
;;
esac
else
SKIP_SOLR=n
fi

if [[ ${SKIP_BRANCH} != y ]]; then
echo "Which branch of mailcow do you want to use?"
echo ""
Expand Down Expand Up @@ -382,14 +362,21 @@ SKIP_CLAMD=${SKIP_CLAMD}
SKIP_SOGO=n
# Skip Solr on low-memory systems or if you do not want to store a readable index of your mails in solr-vol-1.
# Skip Flatcurve (FTS) on low-memory systems or if you simply want to disable it.
SKIP_FLATCURVE=n
# Dovecot Indexing (FTS) Process maximum heap size in MB, there is no recommendation, please see Dovecot docs.
# Flatcurve (Xapian backend) is used as the FTS Indexer. It is supposed to be efficient in CPU and RAM consumption.
# However: Please always monitor your Resource consumption!
SKIP_SOLR=${SKIP_SOLR}
FTS_HEAP=512
# Solr heap size in MB, there is no recommendation, please see Solr docs.
# Solr is a prone to run OOM and should be monitored. Unmonitored Solr setups are not recommended.
# Controls how many processes the Dovecot indexing process can spawn at max.
# Too many indexing processes can use a lot of CPU and Disk I/O.
# Please visit: https://doc.dovecot.org/configuration_manual/service_configuration/#indexer-worker for more informations
SOLR_HEAP=1024
FTS_PROCS=5
# Allow admins to log into SOGo as email user (without any password)
Expand Down
Loading

0 comments on commit 2c50c18

Please sign in to comment.