Browse Source

Improving killall

master
Miguel Gagliardo 5 months ago
parent
commit
f6292ba4c8
1 changed files with 17 additions and 5 deletions
  1. 17
    5
      killall.sh

+ 17
- 5
killall.sh View File

14
     echo "Purging containers data"
14
     echo "Purging containers data"
15
     docker system prune -a -f
15
     docker system prune -a -f
16
 
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"
17
+    echo "Removing packages"
21
     apt remove -y --purge pwgen nginx python3-certbot-nginx coturn* docker*
18
     apt remove -y --purge pwgen nginx python3-certbot-nginx coturn* docker*
22
-
23
     systemctl daemon-reload
19
     systemctl daemon-reload
24
 
20
 
21
+    echo "Purging files and directories"
22
+    rm -rf \
23
+        /etc/nginx \
24
+        /etc/turn* \
25
+        /etc/default/coturn \
26
+        /etc/systemd/system/matrix.service \
27
+        /opt/matrix \
28
+        /tmp/matrix \
29
+        /tmp/homeserver.yaml \
30
+        /etc/letsencrypt \
31
+        /tmp/*.zip
32
+
33
+    echo "Uninstalling and disabling firewall rules"
34
+    ufw disable
35
+    apt remove -y --purge ufw
36
+
25
     echo "Purging finished"
37
     echo "Purging finished"
26
 else
38
 else
27
     echo "KillAll aborted"
39
     echo "KillAll aborted"

Loading…
Cancel
Save