1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Remove script more generic

This commit is contained in:
mbugeia 2014-12-22 18:56:59 +01:00
parent 17d48c8106
commit e670ee9f02
2 changed files with 29 additions and 27 deletions

View file

@ -6,6 +6,7 @@ location PATHTOCHANGE {
index index.php;
client_max_body_size 20M;
try_files $uri $uri/ /index.php?$args;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;

View file

@ -1,18 +1,19 @@
#!/bin/bash
app=kanboard
db_user=kanboard
db_name=kanboard
# Retrieve arguments
domain=$(sudo yunohost app setting $app domain)
root_pwd=$(sudo cat /etc/yunohost/mysql)
domain=$(sudo yunohost app setting kanboard domain)
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
sudo rm -rf /var/www/kanboard
sudo rm -f /etc/nginx/conf.d/$domain.d/kanboard.conf
# Remove sources
sudo rm -rf /var/www/$app
sudo yunohost app setting kanboard mysqlpwd -d
sudo yunohost app setting kanboard adminusername -d
sudo yunohost app setting kanboard domain -d
sudo yunohost app setting kanboard path -d
# Remove database
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
# Remove configuration files
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
# Restart services
sudo service nginx reload
sudo yunohost app ssowatconf