2017-04-08 00:06:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
|
|
set -u
|
2017-07-23 00:14:35 +02:00
|
|
|
|
2017-07-23 17:46:25 +02:00
|
|
|
# Source app helpers
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2017-04-08 00:06:50 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
# Retrieve app settings
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
|
2017-07-23 17:46:25 +02:00
|
|
|
# Stop and remove service
|
|
|
|
ynh_remove_systemd_config
|
2017-04-08 00:06:50 +02:00
|
|
|
|
|
|
|
# Remove sources
|
2017-07-23 17:46:25 +02:00
|
|
|
ynh_secure_remove "/var/www/$app"
|
2017-04-08 00:06:50 +02:00
|
|
|
|
|
|
|
# Remove nginx configuration file
|
2017-07-23 17:46:25 +02:00
|
|
|
ynh_remove_nginx_config
|
2017-04-08 00:06:50 +02:00
|
|
|
|
2017-07-23 17:46:25 +02:00
|
|
|
# Remove user and data
|
2017-07-23 00:14:35 +02:00
|
|
|
ynh_system_user_delete $app
|
2017-04-08 00:06:50 +02:00
|
|
|
|
|
|
|
# Remove monitor
|
|
|
|
sudo yunohost service remove $app
|
|
|
|
|
2017-07-23 17:46:25 +02:00
|
|
|
# Remove Nodejs
|
|
|
|
ynh_remove_nodejs
|