mirror of
https://github.com/pikami/sysadmin.git
synced 2025-05-13 11:52:59 +01:00
Create unalive.sh
This commit is contained in:
parent
163e1c08a0
commit
8327535f1b
38
security/unalive.sh
Normal file
38
security/unalive.sh
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "[*] Stopping services..."
|
||||||
|
swapoff -a
|
||||||
|
systemctl disable mysql
|
||||||
|
systemctl stop mysql
|
||||||
|
systemctl disable nginx
|
||||||
|
systemctl stop nginx
|
||||||
|
|
||||||
|
echo "[*] Wiping MySQL data..."
|
||||||
|
find /var/lib/mysql -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping websites..."
|
||||||
|
find /var/www -type f -exec scrub {} \;
|
||||||
|
find /etc/nginx -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping mail server data..."
|
||||||
|
find /var/spool -type f -exec scrub {} \;
|
||||||
|
find /var/mail -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping logs..."
|
||||||
|
find /var/log -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping user-installed software..."
|
||||||
|
find /usr/local -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping home..."
|
||||||
|
find /root -type f -exec scrub {} \;
|
||||||
|
find /home -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping configs..."
|
||||||
|
find /etc -type f -exec scrub {} \;
|
||||||
|
|
||||||
|
echo "[*] Wiping free space..."
|
||||||
|
scrub -X /
|
||||||
|
|
||||||
|
echo "[*] Done! System is wiped."
|
Loading…
x
Reference in New Issue
Block a user