mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Execute this hook only if we force the configuration regeneration
|
|
if [[ "$1" == "True" ]]; then
|
|
|
|
# Add new email services
|
|
sudo yunohost service add rspamd -l /var/log/mail.log \
|
|
|| echo "Rspamd is already listed in services"
|
|
|
|
sudo yunohost service add rmilter -l /var/log/mail.log \
|
|
|| echo "Rmilter is already listed in services"
|
|
|
|
sudo yunohost service add memcached \
|
|
|| echo "Memcached is already listed in services"
|
|
|
|
# Remove previous email services
|
|
sudo yunohost service remove spamassassin \
|
|
|| echo "Spamassassin is already removed" \
|
|
&& sudo systemctl disable spamassassin || true
|
|
|
|
sudo rm -f etc/cron.daily/spamassassin
|
|
|
|
sudo yunohost service remove amavis \
|
|
|| echo "Amavis is already removed" \
|
|
&& sudo systemctl disable amavis || true
|
|
|
|
sudo yunohost service remove postgrey \
|
|
|| echo "Postgrey is already removed" \
|
|
&& sudo systemctl disable postgrey || true
|
|
|
|
sudo systemctl stop spamassassin || true
|
|
sudo systemctl stop amavis || true
|
|
sudo systemctl stop postgrey || true
|
|
fi
|