2015-04-06 17:46:57 +02:00
|
|
|
#!/bin/bash
|
2017-04-30 15:45:50 +02:00
|
|
|
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
|
|
set -u
|
|
|
|
|
2017-05-08 17:58:16 +02:00
|
|
|
if [ ! -e _common ]; then
|
2017-05-08 17:37:47 +02:00
|
|
|
# Get file fonction if not been to the current directory
|
|
|
|
sudo cp ../settings/scripts/_common ./_common
|
|
|
|
sudo chmod a+rx _common
|
|
|
|
fi
|
2017-04-30 15:45:50 +02:00
|
|
|
# Source app helpers
|
|
|
|
source ./_common
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
# Get multi-instances specific variables
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2015-04-06 17:46:57 +02:00
|
|
|
|
|
|
|
# Retrieve arguments
|
2017-04-30 15:45:50 +02:00
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
2015-04-06 17:46:57 +02:00
|
|
|
|
2017-04-30 15:45:50 +02:00
|
|
|
ynh_secure_remove /var/www/$app
|
|
|
|
ynh_secure_remove /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
ynh_remove_fpm_config
|
2015-04-06 17:46:57 +02:00
|
|
|
|
2017-04-30 15:45:50 +02:00
|
|
|
ynh_system_user_delete $app
|
2015-04-06 17:46:57 +02:00
|
|
|
|
2017-04-30 15:45:50 +02:00
|
|
|
sudo systemctl reload nginx
|