mirror of
https://github.com/YunoHost-Apps/fider_ynh.git
synced 2024-09-03 18:36:11 +02:00
28 lines
730 B
Bash
Executable file
28 lines
730 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# The last argument is the app instance name
|
|
app=${!#}
|
|
|
|
# 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)
|
|
|
|
# Remove sources
|
|
sudo rm -rf /var/www/$app
|
|
|
|
# Remove configuration files
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# If a database is used, remove it
|
|
# root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
# mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
|
|
|
|
# If a dedicated php-fpm process is used :
|
|
#
|
|
#sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
|
#sudo service php5-fpm reload
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|