Check that spamassassin is installed
This commit is contained in:
parent
494ffdbc98
commit
b3dcf0e172
|
@ -4455,6 +4455,10 @@ function spam_filtering {
|
||||||
apt-get -y install exim4-daemon-heavy
|
apt-get -y install exim4-daemon-heavy
|
||||||
apt-get -y install spamassassin
|
apt-get -y install spamassassin
|
||||||
sa-update -v
|
sa-update -v
|
||||||
|
if [ ! -f /etc/default/spamassassin ]; then
|
||||||
|
echo 'Spamassassin was not installed'
|
||||||
|
exit 72570
|
||||||
|
fi
|
||||||
sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
|
sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
|
||||||
sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template
|
sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template
|
||||||
# This configuration is based on https://wiki.debian.org/DebianSpamAssassin
|
# This configuration is based on https://wiki.debian.org/DebianSpamAssassin
|
||||||
|
@ -4598,9 +4602,9 @@ function spam_filtering {
|
||||||
# this must be accessible by root
|
# this must be accessible by root
|
||||||
chown -R $MY_USERNAME:root /home/$MY_USERNAME/.spamassassin
|
chown -R $MY_USERNAME:root /home/$MY_USERNAME/.spamassassin
|
||||||
|
|
||||||
service spamassassin restart
|
systemctl restart spamassassin
|
||||||
service exim4 restart
|
systemctl restart exim4
|
||||||
service cron restart
|
systemctl restart cron
|
||||||
|
|
||||||
echo 'spam_filtering' >> $COMPLETION_FILE
|
echo 'spam_filtering' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
@ -5648,7 +5652,7 @@ function install_web_server {
|
||||||
if grep -q "Nginx-ensite commit" $COMPLETION_FILE; then
|
if grep -q "Nginx-ensite commit" $COMPLETION_FILE; then
|
||||||
CURRENT_NGINX_ENSITE_COMMIT=$(grep "Nginx-ensite commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
|
CURRENT_NGINX_ENSITE_COMMIT=$(grep "Nginx-ensite commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
|
||||||
if [[ "$CURRENT_NGINX_ENSITE_COMMIT" != "$NGINX_ENSITE_COMMIT" ]]; then
|
if [[ "$CURRENT_NGINX_ENSITE_COMMIT" != "$NGINX_ENSITE_COMMIT" ]]; then
|
||||||
$INSTALL_DIR/nginx_ensite
|
$INSTALL_DIR/nginx_ensite
|
||||||
git stash
|
git stash
|
||||||
git checkout master
|
git checkout master
|
||||||
git pull
|
git pull
|
||||||
|
|
Loading…
Reference in New Issue