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
2017-07-21 11:43:20 +02:00

29 lines
756 B
Bash

#!/bin/bash
set -u
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
final_path=$(ynh_app_setting_get $app final_path)
serviceuser=$(ynh_app_setting_get $app serviceuser)
sudo systemctl stop $app.service
# remove Rocketchat from services
sudo yunohost service remove $app
sudo rm -rf $final_path
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
sudo rm -rf /var/log/$app
sudo rm -f /etc/systemd/system/$app.service
sudo userdel -r $serviceuser
sudo systemctl daemon-reload
sudo systemctl reload nginx