mirror of
https://github.com/YunoHost-Apps/agendav_ynh.git
synced 2024-09-03 20:36:12 +02:00
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
25 lines
632 B
Bash
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
|