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

View file

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