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

32 lines
767 B
Text
Raw Normal View History

2016-04-29 16:32:48 +02:00
#!/bin/bash
2017-07-18 13:21:17 +02:00
set -u
2016-04-29 16:32:48 +02:00
2017-07-18 13:03:45 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
source ./_common.sh
2017-07-18 13:03:45 +02:00
2017-07-18 13:21:17 +02:00
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
2017-07-21 10:54:41 +02:00
final_path=$(ynh_app_setting_get $app final_path)
2016-04-29 16:32:48 +02:00
systemctl stop $app.service
2016-04-29 16:32:48 +02:00
2017-07-19 13:32:24 +02:00
# remove Rocketchat from services
yunohost service remove $app
2017-07-19 13:32:24 +02:00
ynh_secure_remove $final_path
ynh_secure_remove /etc/nginx/conf.d/$domain.d/$app.conf
ynh_secure_remove /var/log/$app
ynh_secure_remove /etc/systemd/system/$app.service
# remove database!!!
mongo rocketchat --eval "db.dropDatabase()"
systemctl daemon-reload
systemctl reload nginx