1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00
roundcube_ynh/scripts/remove
Jérôme Lebleu eb43d2e8c5 [enh] Initial commit for new app based on Kloadut/roundcube_ynh
Since sources where included in the last YunoHost app package, this
rebase is intended to have a lighter git repository.
2016-05-19 19:49:47 +02:00

28 lines
643 B
Bash

#!/bin/bash
# Load common variables and helpers
. ./_common.sh
# Set app specific variables
app=$1
dbname=$app
dbuser=$app
# Source app helpers
. /usr/share/yunohost/helpers
# 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