mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
25 lines
606 B
Bash
25 lines
606 B
Bash
#!/bin/bash
|
|
|
|
app="kanboard"
|
|
|
|
dbname=$app
|
|
dbuser=$app
|
|
|
|
# Source app helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Drop MySQL database and user
|
|
ynh_mysql_drop_db "$dbname" 2>/dev/null || true
|
|
ynh_mysql_drop_user "$dbuser" 2>/dev/null || true
|
|
|
|
# Retrieve domain from app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
# Delete app directory and configurations
|
|
sudo rm -rf "/var/www/${app}"
|
|
sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
|
|
[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
|
|
|
# Reload services
|
|
sudo service php5-fpm restart || true
|
|
sudo service nginx reload || true
|