mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
41 lines
1,002 B
Bash
Executable file
41 lines
1,002 B
Bash
Executable file
#!/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
|
|
|
|
# Régénère la configuration de SSOwat
|
|
sudo yunohost app ssowatconf
|
|
sudo service nginx reload
|
|
|