[Update] Disable Solr when upgrading from non-Solr mailcows

master
andryyy 2019-01-19 22:00:18 +01:00
parent 4235d8a1d1
commit 54a14c01aa
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 6 additions and 0 deletions

View File

@ -222,6 +222,12 @@ for option in ${CONFIG_ARRAY[@]}; do
echo '# Solr will refuse to start with total system memory below or equal to 2 GB.' >> mailcow.conf echo '# Solr will refuse to start with total system memory below or equal to 2 GB.' >> mailcow.conf
echo "SOLR_HEAP=1024" >> mailcow.conf echo "SOLR_HEAP=1024" >> mailcow.conf
fi fi
elif [[ ${option} == "SKIP_SOLR" ]]; then
if ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf"
echo '# Solr is disabled by default after upgrading from non-Solr to Solr-enabled mailcows.' >> mailcow.conf
echo "SKIP_SOLR=y" >> mailcow.conf
fi
elif ! grep -q ${option} mailcow.conf; then elif ! grep -q ${option} mailcow.conf; then
echo "Adding new option \"${option}\" to mailcow.conf" echo "Adding new option \"${option}\" to mailcow.conf"
echo "${option}=n" >> mailcow.conf echo "${option}=n" >> mailcow.conf