2016-07-26 22:51:05 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-06-28 17:29:32 +02:00
|
|
|
# Exit on command errors and treat unset variables as an error
|
2016-12-18 01:13:17 +01:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2015-03-07 15:30:01 +01:00
|
|
|
|
2016-06-28 17:29:32 +02:00
|
|
|
# Source app helpers
|
2017-02-21 23:23:45 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
2017-02-24 22:26:22 +01:00
|
|
|
source .fonctions
|
2015-02-01 20:20:54 +01:00
|
|
|
|
2016-06-28 17:29:32 +02:00
|
|
|
# Retrieve arguments
|
2017-02-21 23:23:45 +01:00
|
|
|
dbuser=$app
|
|
|
|
dbname=$app
|
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
2015-02-01 20:20:54 +01:00
|
|
|
|
2016-06-28 17:29:32 +02:00
|
|
|
# Drop MySQL database and user
|
2017-02-21 23:23:45 +01:00
|
|
|
ynh_mysql_drop_db "$dbname" 2>&1 || true
|
|
|
|
ynh_mysql_drop_user "$dbuser" 2>&1 || true
|
2015-02-06 19:42:21 +01:00
|
|
|
|
2017-02-24 13:13:59 +01:00
|
|
|
# Delete app directory and configurations using secure remove
|
|
|
|
SECURE_REMOVE '/var/www/${app}'
|
|
|
|
REMOVE_NGINX_CONF
|
|
|
|
REMOVE_FPM_CONF
|
2016-06-28 17:29:32 +02:00
|
|
|
|
2016-12-18 01:13:17 +01:00
|
|
|
# Remove GPG key
|
2017-02-21 23:23:45 +01:00
|
|
|
sudo gpg --batch --delete-key --yes Rainloop
|
2016-12-18 01:13:17 +01:00
|
|
|
|
2016-06-28 17:29:32 +02:00
|
|
|
# Reload services
|
2017-02-24 12:15:57 +01:00
|
|
|
sudo service php5-fpm reload
|
|
|
|
sudo service nginx reload
|