1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00
cryptpad_ynh/scripts/remove

32 lines
556 B
Text
Raw Normal View History

2017-04-08 00:06:50 +02:00
#!/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
2017-04-08 00:06:50 +02:00
app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings
domain=$(ynh_app_setting_get $app domain)
# Stop and remove service
ynh_remove_systemd_config
2017-04-08 00:06:50 +02:00
# Remove sources
ynh_secure_remove "/var/www/$app"
2017-04-08 00:06:50 +02:00
# Remove nginx configuration file
ynh_remove_nginx_config
2017-04-08 00:06:50 +02:00
# Remove user and data
ynh_system_user_delete $app
2017-04-08 00:06:50 +02:00
# Remove monitor
sudo yunohost service remove $app
# Remove Nodejs
ynh_remove_nodejs