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

29 lines
696 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
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
2017-07-21 10:54:41 +02:00
sudo systemctl stop $app.service
2016-04-29 16:32:48 +02:00
2017-07-19 13:32:24 +02:00
# remove Rocketchat from services
2017-07-21 10:54:41 +02:00
sudo yunohost service remove $app
2017-07-19 13:32:24 +02:00
2017-07-21 10:54:41 +02:00
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 $app
2017-07-19 11:13:17 +02:00
2017-07-19 11:27:56 +02:00
sudo systemctl daemon-reload
2017-07-21 10:54:41 +02:00
sudo systemctl reload nginx