|
@@ -0,0 +1,28 @@
|
|
1
|
+#!/bin/bash
|
|
2
|
+
|
|
3
|
+set -euo pipefail
|
|
4
|
+
|
|
5
|
+printf 'WARNING: Will remove everything now. Please confirm: (Y/N) '
|
|
6
|
+read answer
|
|
7
|
+
|
|
8
|
+if [ "${answer}" != "${answer#[Yy]}" ] ;then
|
|
9
|
+ echo "Stopping services"
|
|
10
|
+ systemctl disable --now matrix
|
|
11
|
+ systemctl disable --now nginx
|
|
12
|
+ systemctl disable --now coturn
|
|
13
|
+
|
|
14
|
+ echo "Purging containers data"
|
|
15
|
+ docker system prune -a -f
|
|
16
|
+
|
|
17
|
+ echo "Purging directories"
|
|
18
|
+ rm -rf /etc/nginx /etc/turn* /etc/default/coturn /etc/systemd/system/matrix.service /opt/matrix /tmp/matrix /tmp/homeserver.yaml
|
|
19
|
+
|
|
20
|
+ echo "Purging directories"
|
|
21
|
+ apt remove -y --purge pwgen nginx python3-certbot-nginx coturn* docker*
|
|
22
|
+
|
|
23
|
+ systemctl daemon-reload
|
|
24
|
+
|
|
25
|
+ echo "Purging finished"
|
|
26
|
+else
|
|
27
|
+ echo "KillAll aborted"
|
|
28
|
+fi
|