mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
|
|
|
|
# Récupère les infos de l'application.
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Source app helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
|
|
|
|
SECURE_REMOVE '/opt/yunohost/$app'
|
|
|
|
SECURE_REMOVE '/etc/$app/' # Delete radicale config
|
|
|
|
# Suppression de la configuration uwsgi
|
|
# Stoppe le service uwsgi
|
|
sudo service uwsgi stop
|
|
if [ -e "/etc/uwsgi/apps-available/radicale.ini" ]; then
|
|
echo "Delete uwsgi config"
|
|
sudo rm "/etc/uwsgi/apps-available/radicale.ini"
|
|
fi
|
|
if [ -h "/etc/uwsgi/apps-enabled/radicale.ini" ]; then
|
|
echo "Delete uwsgi config"
|
|
sudo rm "/etc/uwsgi/apps-enabled/radicale.ini"
|
|
fi
|
|
|
|
if grep -q "^radicale:" /etc/passwd # Test l'existence de l'utilisateur
|
|
then
|
|
sudo userdel radicale
|
|
fi
|
|
# Redémarre le service uwsgi
|
|
sudo service uwsgi start
|
|
|
|
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
|
|
|
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
|
|
|
|
REMOVE_LOGROTATE_CONF # Suppression de la configuration de logrotate
|
|
|
|
# Régénère la configuration de SSOwat
|
|
sudo yunohost app ssowatconf
|
|
|
|
echo -e "\e[0m" # Restore normal color
|