mirror of
https://github.com/YunoHost-Apps/agendav_ynh.git
synced 2024-09-03 20:36:12 +02:00
35 lines
721 B
Bash
35 lines
721 B
Bash
#!/bin/bash
|
|
|
|
# Source local helpers
|
|
source ./_common.sh
|
|
|
|
# Source app helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Set app specific variables
|
|
app="$YNH_APP_INSTANCE_NAME"
|
|
dbname=$app
|
|
dbuser=$app
|
|
|
|
# Drop MySQL database and user
|
|
ynh_mysql_drop_db "$dbname"
|
|
ynh_mysql_drop_user "$dbuser"
|
|
|
|
# Retrieve domain from app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
# Delete app directory and configurations
|
|
ynh_secure_remove "/var/www/${app}"
|
|
ynh_secure_remove "/var/log/${app}"
|
|
ynh_remove_fpm_config
|
|
ynh_remove_nginx_config
|
|
|
|
# Remove metapackage and its dependencies
|
|
ynh_remove_app_dependencies
|
|
|
|
# Reload services
|
|
service php5-fpm restart
|
|
service nginx reload
|
|
|
|
# Remove the user account
|
|
ynh_system_user_delete "$app"
|