#!/bin/bash set -euo pipefail printf 'WARNING: Will remove everything now. Please confirm: (Y/N) ' read answer if [ "${answer}" != "${answer#[Yy]}" ] ;then echo "Stopping services" systemctl disable --now matrix systemctl disable --now nginx systemctl disable --now coturn echo "Purging containers data" docker system prune -a -f echo "Purging directories" rm -rf /etc/nginx /etc/turn* /etc/default/coturn /etc/systemd/system/matrix.service /opt/matrix /tmp/matrix /tmp/homeserver.yaml echo "Purging directories" apt remove -y --purge pwgen nginx python3-certbot-nginx coturn* docker* systemctl daemon-reload echo "Purging finished" else echo "KillAll aborted" fi