#!/bin/bash set -u #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source ./_common.sh 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 # remove database!!! sudo mongo rocketchat --eval "db.dropDatabase()" # remove user!!! sudo userdel -r $serviceuser sudo systemctl daemon-reload sudo systemctl reload nginx