mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
27 lines
668 B
Bash
27 lines
668 B
Bash
#!/bin/bash
|
|
|
|
|
|
# See comments in install script
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Retrieve app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
path=$(ynh_app_setting_get "$app" path)
|
|
dbuser=$(ynh_app_setting_get "$app" dbuser)
|
|
dbname=$(ynh_app_setting_get "$app" dbname)
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
mysql -u root -p $root_pwd -e "DROP DATABASE $dbname ; DROP USER $dbuser@localhost ;"
|
|
sudo rm -rf /var/www/$app
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
sudo service nginx reload
|
|
sudo rm -Rf /var/log/$app
|
|
|
|
sudo update-rc.d $app remove
|
|
sudo service $app stop
|
|
sudo rm /etc/init.d/$app
|