seafile_ynh/scripts/remove

10 lines
305 B
Text
Raw Normal View History

#!/bin/bash
db_user=seafile
db_name=seafile
root_pwd=$(sudo cat /etc/yunohost/mysql)
domain=$(sudo yunohost app setting seafile domain)
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
sudo rm -rf /var/www/seafile
sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf