mirror of http://138.197.108.81/gattes/matrix.git
Adding killall script
This commit is contained in:
parent
8162e68ec9
commit
7d857dcb67
13
README.md
13
README.md
|
@ -55,3 +55,16 @@ The first user will need to be created via command line interface, this is uniqu
|
|||
```
|
||||
|
||||
From there after, you can just use the admin panel to create users, the admin panel is located in `https://<DOMIN>/admin` (it requires admin user login)
|
||||
|
||||
|
||||
## Cleanup
|
||||
|
||||
To remove everything from the server, just run the `killall.sh` script:
|
||||
|
||||
```shell
|
||||
% cd /opt/matrix
|
||||
% ./killall.sh
|
||||
WARNING: Will remove everything now. Please confirm: (Y/N)
|
||||
```
|
||||
|
||||
Select the option `Y` (yes) and it'll be done
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/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
|
Loading…
Reference in New Issue