This commit is contained in:
Maniack Crudelis 2017-03-26 21:10:02 +00:00 committed by GitHub
commit 29910f22ba

View file

@ -10,15 +10,24 @@ source /usr/share/yunohost/helpers
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
# Remove sources # Remove sources
sudo rm -rf /var/www/$app # Avoid removing important directory if $app is empty or $src_path equal to
# "/" "/var" "/var/www" "/opt" "/home" "/home/yunohost.app"
src_path=/var/www/$app
if test -z "$app" || [ "/var/www /opt /home/yunohost.app" =~ $src_path ]; then
echo "Variable src_path seems incomplete, deletion of app directory cancelled." >&2
else
sudo rm -rf $src_path
fi
# Remove nginx configuration file # Remove nginx configuration file
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
# Reload nginx service
sudo service nginx reload
### PHP (remove if not used) ### ### PHP (remove if not used) ###
# If a dedicated php-fpm process is used: # If a dedicated php-fpm process is used:
# sudo rm -f /etc/php5/fpm/pool.d/$app.conf sudo rm -f /etc/php5/fpm/pool.d/$app.conf
# sudo service php5-fpm reload sudo service php5-fpm reload
### PHP end ### ### PHP end ###
### MySQL (remove if not used) ### ### MySQL (remove if not used) ###
@ -30,5 +39,3 @@ sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
# ynh_mysql_drop_user "$dbuser" || true # ynh_mysql_drop_user "$dbuser" || true
### MySQL end ### ### MySQL end ###
# Reload nginx service
sudo service nginx reload