mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
31 lines
767 B
Bash
31 lines
767 B
Bash
#!/bin/bash
|
|
set -u
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source /usr/share/yunohost/helpers
|
|
source ./_common.sh
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
final_path=$(ynh_app_setting_get $app final_path)
|
|
|
|
systemctl stop $app.service
|
|
|
|
# remove Rocketchat from services
|
|
yunohost service remove $app
|
|
|
|
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
|