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:
parent
17d48c8106
commit
e670ee9f02
2 changed files with 29 additions and 27 deletions
|
@ -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;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
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;
|
||||
}
|
|
@ -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
|
Loading…
Reference in a new issue