You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
635 B
30 lines
635 B
#!/bin/bash
|
|
app=huginn
|
|
|
|
# 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)
|
|
|
|
|
|
cd /home/huginn/huginn/
|
|
sudo rake production:stop
|
|
|
|
|
|
# Remove sources
|
|
sudo rm -rf /home/$app
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE huginn ; DROP USER $APP@localhost ;"
|
|
|
|
sudo userdel huginn
|
|
|
|
# Remove configuration files
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf
|