1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/scrumblr_ynh.git synced 2024-09-03 20:16:29 +02:00

Update remove

This commit is contained in:
frju365 2017-08-15 17:32:18 +02:00 committed by GitHub
parent 9edc13b11b
commit 65a59ed081

View file

@ -1,34 +1,34 @@
#!/bin/bash #!/bin/bash
# Source app helpers
source /usr/share/yunohost/helpers
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -u set -u
set -eu
# Source app helpers
source _common.sh
source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
sudo systemctl stop $app.service # Stop and remove service
ynh_remove_systemd_config
# Remove logrotate configuration
ynh_remove_logrotate
# Remove sources # Remove sources
sudo rm -rf /var/www/$app ynh_secure_remove "/var/www/$app"
# Remove nginx configuration file # Remove nginx configuration file
[[ -n $domain ]] && sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf ynh_remove_nginx_config
# Remove haste user and data # Remove user and data
sudo userdel -r $app ynh_system_user_delete $app
# Remove init script
sudo systemctl disable $app.service
sudo rm -f /etc/systemd/system/$app.service
sudo systemctl daemon-reload
# Remove monitor # Remove monitor
sudo yunohost service remove $app sudo yunohost service remove $app
# Reload nginx service # Remove Nodejs
sudo systemctl reload nginx.service ynh_remove_nodejs