mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
43 lines
1 KiB
Bash
43 lines
1 KiB
Bash
#!/bin/bash
|
|
|
|
app=lutim
|
|
|
|
# Récupère les infos de l'application.
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
codename=$(sudo yunohost app setting $app codename)
|
|
|
|
# Arrêt du service
|
|
sudo service lutim stop
|
|
|
|
# Retire le service du monitoring de Yunohost.
|
|
sudo yunohost service remove lutim
|
|
|
|
if [ "$codename" = "wheezy" ]
|
|
then # Suppression des fichiers init
|
|
sudo rm -f /etc/default/lutim
|
|
sudo rm -f /etc/init.d/lutim
|
|
sudo update-rc.d -f lutim remove
|
|
else # Suppression des fichiers systemd
|
|
sudo systemctl disable lutim.service
|
|
sudo rm -f /etc/systemd/system/lutim.service
|
|
fi
|
|
|
|
# Suppression du dossier de l'application
|
|
sudo rm -rf /var/www/$app
|
|
|
|
# Suppression de la configuration nginx
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# Retirer le cron
|
|
sudo rm -f /etc/cron.d/$app
|
|
|
|
# Suppression des log
|
|
sudo rm -r /var/log/$app/
|
|
|
|
# Suppression de la configuration de logrotate
|
|
sudo rm /etc/logrotate.d/$app
|
|
|
|
# Recharge la configuration Nginx
|
|
sudo service nginx reload
|
|
# Régénère la configuration de SSOwat
|
|
sudo yunohost app ssowatconf
|