diff --git a/conf/nginx.conf b/conf/nginx.conf index 12d3efb..38145f0 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,20 +1,21 @@ location PATHTOCHANGE { - alias ALIASTOCHANGE; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - 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; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - } + alias ALIASTOCHANGE; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + 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; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + } - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } \ No newline at end of file diff --git a/scripts/remove b/scripts/remove index 5dcd317..c36f229 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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 \ No newline at end of file