1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00
synapse_ynh/scripts/remove

44 lines
1 KiB
Text
Raw Normal View History

2017-02-13 20:43:41 +01:00
#!/bin/bash
# Import common cmd
source ./_common.sh
# Init script
init_script
domain=$(ynh_app_setting_get $app domain)
synapse_tls_port=$(ynh_app_setting_get $app synapse_tls_port)
turnserver_tls_port=$(ynh_app_setting_get $app turnserver_tls_port)
sudo service matrix-synapse stop || true
sudo service coturn stop || true
ynh_package_autoremove matrix-synapse python-matrix-synapse-ldap3 coturn || true
REMOVE_NGINX_CONF # Suppression de la configuration nginx
REMOVE_LOGROTATE_CONF # Suppression de la configuration de logrotate
closeport() {
if sudo yunohost firewall list | grep -q "\- $port$"
then
echo "Close port $port"
sudo yunohost firewall disallow TCP $port > /dev/null
fi
}
port=$synapse_tls_port
closeport
port=$turnserver_tls_port
closeport
sudo rm -rf /etc/apt/sources.list.d/matrix.list
sudo rm -rf /var/lib/matrix-synapse
ynh_package_update
2017-05-26 15:29:12 +02:00
sudo yunohost service remove matrix-synapse
2017-02-13 20:43:41 +01:00
# Régénère la configuration de SSOwat
sudo yunohost app ssowatconf
sudo service nginx reload