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

Create remove

This commit is contained in:
frju365 2017-08-10 17:20:09 +02:00 committed by GitHub
parent b5d89ec76c
commit 86eb609ce6

34
scripts/remove Normal file
View file

@ -0,0 +1,34 @@
#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -u
# Source app helpers
source _common.sh
source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings
domain=$(ynh_app_setting_get $app domain)
# Stop and remove service
ynh_remove_systemd_config
# Remove logrotate configuration
ynh_remove_logrotate
# Remove sources
ynh_secure_remove "/var/www/$app"
# Remove nginx configuration file
ynh_remove_nginx_config
# Remove user and data
ynh_system_user_delete $app
# Remove monitor
sudo yunohost service remove $app
# Remove Nodejs
ynh_remove_nodejs