mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
16ef7053e6
* Correct restore script `ynh_package_install_from_equivs` * Change in each script `#! /bin/bash` with `#!/bin/bash` * Correct `pathluaregex` in case of a installation on root
33 lines
824 B
Bash
33 lines
824 B
Bash
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#retrieve arguments
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
domain=$(ynh_app_setting_get "${app}" domain)
|
|
|
|
if [ -e "/var/www/${app}" ]; then
|
|
echo "Delete app"
|
|
sudo rm -rf /var/www/${app}
|
|
fi
|
|
if [ -e "/etc/nginx/conf.d/${domain}.d/${app}.conf" ]; then
|
|
echo "Delete Nginx config"
|
|
sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
|
fi
|
|
if [ -e "/etc/php5/fpm/pool.d/${app}.conf" ]; then
|
|
echo "Delete fpm config"
|
|
sudo rm -f /etc/php5/fpm/pool.d/${app}.conf
|
|
fi
|
|
if [ -e "/home/yunohost.app/${app}" ]; then
|
|
echo "Delete datas"
|
|
sudo rm -rf /home/yunohost.app/${app}
|
|
fi
|
|
|
|
# Restart services
|
|
sudo service php5-fpm restart || true
|
|
sudo service nginx reload || true
|
|
sudo yunohost app ssowatconf
|