#!/bin/bash db_user=movim db_name=movim root_pwd=$(sudo cat /etc/yunohost/mysql) mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" # Removing executable files and user sudo userdel movim sudo rm -rf /var/www/movim domain=$(sudo yunohost app setting movim domain) sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf #REMOVE INIT sudo /etc/init.d/movim stop sudo systemctl stop movim sudo systemctl disable movim sudo update-rc.d -f movim remove sudo rm /etc/init.d/movim sudo rm /lib/systemd/system/movim.service # Restarting services sudo service nginx reload