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
|
|
|
|
|
|
|
|
# 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
|