mirror of
https://github.com/YunoHost-Apps/teampass_ynh.git
synced 2024-09-03 20:26:37 +02:00
30 lines
691 B
Bash
30 lines
691 B
Bash
#!/bin/bash
|
|
app=teampass
|
|
|
|
# Retrieve arguments
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
path=$(sudo yunohost app setting $app path)
|
|
|
|
# Remove sources
|
|
sudo rm -rf /var/www/$app
|
|
|
|
# Remove configuration files
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
#Remove the sk.php
|
|
sudo rm -rf /etc/teampass/
|
|
|
|
# Suppression de la config php-fpm
|
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
|
sudo rm -f /etc/php5/fpm/conf.d/20-$app.ini
|
|
|
|
db_user=$app
|
|
db_name=$app
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf
|
|
sudo service php5-fpm reload
|
|
|