remove 931 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # Exit on command errors and treat unset variables as an error
  3. set -u
  4. # Source app helpers
  5. source /usr/share/yunohost/helpers
  6. # Get multi-instances specific variables
  7. app=$YNH_APP_INSTANCE_NAME
  8. # Retrieve app settings
  9. domain=$(ynh_app_setting_get "$app" domain)
  10. # with_mysql=$(ynh_app_setting_get "$app" with_mysql)
  11. # Drop MySQL database and user as needed
  12. #if [[ $with_mysql -eq 1 ]]; then
  13. dbname=$app
  14. dbuser=$app
  15. dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
  16. ynh_mysql_drop_db $dbname || true
  17. ynh_mysql_drop_user $dbuser || true
  18. #fi
  19. # Delete app directory and configurations
  20. SECURE_REMOVE '/var/www/$app' # Delete directory application
  21. sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
  22. sudo rm -f "/etc/php5/fpm/conf.d/20-${app}.ini"
  23. [[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
  24. # Reload services
  25. sudo systemctl reload php5-fpm
  26. sudo systemctl reload nginx
  27. sudo yunohost app ssowatconf