2015-08-20 15:06:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# DotClear 2 remove script for YunoHost
|
|
|
|
|
|
|
|
app=dotclear2
|
|
|
|
|
|
|
|
# Retrieve arguments
|
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
path=$(sudo yunohost app setting $app path)
|
|
|
|
admin=$(sudo yunohost app setting $app admin)
|
|
|
|
is_public=$(sudo yunohost app setting $app is_public)
|
2015-08-21 13:28:41 +02:00
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
2015-08-20 15:06:37 +02:00
|
|
|
|
|
|
|
# Remove sources
|
|
|
|
sudo rm -rf /var/www/$app
|
|
|
|
|
|
|
|
# Remove configuration files
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
|
2015-08-21 13:28:41 +02:00
|
|
|
# Remove database
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
|
|
|
|
|
2015-08-20 15:06:37 +02:00
|
|
|
# Restart services
|
2015-08-21 16:34:13 +02:00
|
|
|
sudo /etc/init.d/nginx reload
|
2015-08-20 15:06:37 +02:00
|
|
|
sudo yunohost app ssowatconf
|