mirror of
https://github.com/YunoHost-Apps/teampass_ynh.git
synced 2024-09-03 20:26:37 +02:00
33 lines
885 B
Bash
33 lines
885 B
Bash
#!/bin/bash
|
|
|
|
app=teampass
|
|
|
|
# Récupère les infos de l'application.
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
# Utilise '$app' comme nom d'utilisateur et de base de donnée
|
|
db_user=$app
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_user ; DROP USER $db_user@localhost ;"
|
|
|
|
# Suppression du dossier de l'application
|
|
sudo rm -rf /var/www/$app
|
|
|
|
#Remove the sk.php
|
|
sudo rm -rf /etc/teampass/
|
|
|
|
# Suppression de la configuration nginx
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# Suppression des log
|
|
sudo rm -r /var/log/$app/
|
|
|
|
# Suppression de la configuration du pool php-fpm
|
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
|
sudo rm -f /etc/php5/fpm/conf.d/20-$app.ini
|
|
|
|
# Recharge la configuration Nginx et php5-fpm
|
|
sudo service nginx reload
|
|
sudo service php5-fpm reload
|
|
# Régénère la configuration de SSOwat
|
|
sudo yunohost app ssowatconf
|