1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2024-09-03 20:36:12 +02:00
agendav_ynh/scripts/remove
Jérôme Lebleu 6f89f5dfc8 [enh] Improve packaging and upgrade AgenDAV to 2.0
Besides the AgenDAV upgrade, it improves the packaging - only the install
and remove scripts yet - with the following:
 * download and check sources, and apply a patch to modify them
 * add a specific PHP FPM pool for AgenDAV
 * allow to select AgenDAV default language
 * allow to extend AgenDAV configuration in a local.php file
2016-07-15 14:43:35 +02:00

25 lines
632 B
Bash

#!/bin/bash
# Set app specific variables
app="agendav"
dbname=$app
dbuser=$app
# Source YunoHost helpers
source /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}" "/var/log/${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