2016-06-14 12:25:46 +02:00
|
|
|
#!/bin/bash
|
2014-11-12 22:22:53 +01:00
|
|
|
|
2017-04-05 18:59:52 +02:00
|
|
|
# Exit and treat unset variables as an error
|
|
|
|
set -u
|
|
|
|
|
2016-06-15 23:39:38 +02:00
|
|
|
# Source YunoHost helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2016-06-18 11:36:30 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
|
2016-06-15 20:31:21 +02:00
|
|
|
# Remove sources
|
2014-11-12 22:22:53 +01:00
|
|
|
sudo rm -rf /var/www/$app
|
2016-06-15 20:31:21 +02:00
|
|
|
|
|
|
|
# Remove nginx conf and reload nginx service
|
2014-11-12 22:22:53 +01:00
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
2016-06-15 20:31:21 +02:00
|
|
|
sudo service nginx reload
|