mirror of
https://github.com/YunoHost-Apps/dotclear2_ynh.git
synced 2024-09-03 18:26:29 +02:00
24 lines
622 B
Bash
Executable file
24 lines
622 B
Bash
Executable file
#!/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)
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
# Remove sources
|
|
sudo rm -rf /var/www/$app
|
|
|
|
# Remove configuration files
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# Remove database
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
|
|
|
|
# Restart services
|
|
sudo /etc/init.d/nginx reload
|
|
sudo yunohost app ssowatconf
|