1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/baikal_ynh.git synced 2024-09-03 18:16:11 +02:00
baikal_ynh/scripts/remove
Jérôme Lebleu 1252a08d63 [enh] Update to Baikal 0.4.4 and download upstream sources
Sources are removed from the repository and downloaded instead to
improve readability and updates. This also comes with a patch to add
LDAP authentication backend.
The `install` and `remove` scripts have also been almost rewrite to
make use of new YunoHost helpers and facilities coming with 2.3.x.
2016-05-02 23:01:28 +02:00

27 lines
623 B
Bash

#!/bin/bash
# Retrieve arguments
app=${!#}
# Load common variables and helpers
source ./_common.sh
# Set app specific variables
dbname=$app
dbuser=$app
# Drop MySQL database and user
ynh_mysql_drop_db $dbname || true
ynh_mysql_drop_user $dbuser || 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