mirror of
https://github.com/YunoHost-Apps/dokuwiki_ynh.git
synced 2024-09-03 18:26:20 +02:00
25 lines
No EOL
632 B
Bash
Executable file
25 lines
No EOL
632 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -u
|
|
|
|
# Get multi-instances specific variables
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Source app helpers
|
|
. /usr/share/yunohost/helpers
|
|
|
|
# Retrieve app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
# Delete app directory and configurations
|
|
sudo rm -rf "/var/www/${app}"
|
|
sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
|
|
sudo rm -f "/etc/php5/fpm/conf.d/20-${app}.ini"
|
|
[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
|
|
|
# Reload services
|
|
sudo systemctl reload php5-fpm
|
|
sudo systemctl reload nginx
|
|
|
|
echo -e "\e[0m" # Restore normal color |