#!/bin/bash source _common.sh source /usr/share/yunohost/helpers domain=$(ynh_app_setting_get $app domain) db_name=$(ynh_app_setting_get $app db_name) db_user==$db_name root_pwd=$(sudo cat /etc/yunohost/mysql) postfix=/etc/postfix/main.cf #remove php-geoip ynh_remove_app_dependencies #removing emailpoubelle database ynh_mysql_remove_db $db_user $db_name #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 #efface le nouvel virtual alias sudo sed -i "/virtual_alias_maps = hash:\/var\/www\/emailpoubelle\/var\/virtual/d" $postfix #reactive le nouveau ynh_replace_string "^#virtual_alias_maps" "virtual_alias_maps" $postfix #remove cronjob sudo rm -f /etc/cron.d/emailpoubelle sudo service postfix reload sudo service nginx reload sudo yunohost app ssowatconf