2018-11-18 16:00:35 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-11-21 00:22:08 +01:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
|
2018-11-24 11:14:21 +01:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
2018-11-24 11:55:35 +01:00
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
|
|
|
db_user==$db_name
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
2018-11-18 16:00:35 +01:00
|
|
|
postfix=/etc/postfix/main.cf
|
2018-11-21 00:22:08 +01:00
|
|
|
|
2018-11-24 11:14:21 +01:00
|
|
|
#remove php-geoip
|
|
|
|
ynh_remove_app_dependencies
|
2018-11-18 16:00:35 +01:00
|
|
|
#removing emailpoubelle database
|
2018-11-21 00:22:08 +01:00
|
|
|
ynh_mysql_remove_db $db_user $db_name
|
2018-11-18 16:00:35 +01:00
|
|
|
#removing emailpoubelle directory
|
|
|
|
sudo rm -rf /var/www/emailpoubelle
|
|
|
|
#removing nginx conf
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/emailpoubelle.conf
|
|
|
|
#removing aliases
|
|
|
|
sudo sed -i "/devnull:\/dev\/null/d" /etc/aliases
|
|
|
|
sudo newaliases
|
2018-11-25 16:40:00 +01:00
|
|
|
#efface le nouvel virtual alias
|
2018-11-18 16:00:35 +01:00
|
|
|
sudo sed -i "/virtual_alias_maps = hash:\/var\/www\/emailpoubelle\/var\/virtual/d" $postfix
|
2018-11-25 16:40:00 +01:00
|
|
|
#reactive le nouveau
|
|
|
|
ynh_replace_string "^#virtual_alias_maps" "virtual_alias_maps" $postfix
|
|
|
|
|
2018-11-18 16:00:35 +01:00
|
|
|
#remove cronjob
|
|
|
|
sudo rm -f /etc/cron.d/emailpoubelle
|
|
|
|
sudo service postfix reload
|
|
|
|
sudo service nginx reload
|
2018-11-21 00:22:08 +01:00
|
|
|
sudo yunohost app ssowatconf
|