remove 730 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # The last argument is the app instance name
  3. app=${!#}
  4. # Retrieve arguments
  5. domain=$(sudo yunohost app setting $app domain)
  6. path=$(sudo yunohost app setting $app path)
  7. admin=$(sudo yunohost app setting $app admin)
  8. is_public=$(sudo yunohost app setting $app is_public)
  9. # Remove sources
  10. sudo rm -rf /var/www/$app
  11. # Remove configuration files
  12. sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
  13. # If a database is used, remove it
  14. # root_pwd=$(sudo cat /etc/yunohost/mysql)
  15. # mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
  16. # If a dedicated php-fpm process is used :
  17. #
  18. #sudo rm -f /etc/php5/fpm/pool.d/$app.conf
  19. #sudo service php5-fpm reload
  20. # Restart services
  21. sudo service nginx reload