mirror of
https://github.com/YunoHost/example_ynh.git
synced 2024-09-03 20:06:13 +02:00
Merge 8a2715dabd
into 05c55dc318
This commit is contained in:
commit
29910f22ba
1 changed files with 12 additions and 5 deletions
|
@ -10,15 +10,24 @@ source /usr/share/yunohost/helpers
|
|||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
|
||||
# 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
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
# Reload nginx service
|
||||
sudo service nginx reload
|
||||
|
||||
### PHP (remove if not used) ###
|
||||
# If a dedicated php-fpm process is used:
|
||||
# sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
||||
# sudo service php5-fpm reload
|
||||
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
||||
sudo service php5-fpm reload
|
||||
### PHP end ###
|
||||
|
||||
### 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
|
||||
### MySQL end ###
|
||||
|
||||
# Reload nginx service
|
||||
sudo service nginx reload
|
||||
|
|
Loading…
Add table
Reference in a new issue