File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -61,30 +61,17 @@ elif [ -n "$(command -v apt-get)" ]; then
6161 apt-get -y update
6262 apt-get -y upgrade
6363fi
64-
65- # Set multi-user target (non-graphical) as default
66- systemctl set-default multi-user.target
67- systemctl disable getty@tty1.service
68- systemctl mask getty@tty1.service
69- systemctl mask graphical.target
70-
7164rm -rf /tmp/* /var/tmp/*
7265history -c
7366cat /dev/null > /root/.bash_history
7467unset HISTFILE
75-
76- journalctl --rotate
77- journalctl --vacuum-time=1s
7868find /var/log -mtime -1 -type f -exec truncate -s 0 {} \;
7969rm -rf /var/log/* .gz /var/log/* .[0-9] /var/log/* -????????
8070rm -rf /var/lib/cloud/instances/*
8171rm -f /root/.ssh/authorized_keys /etc/ssh/* key*
8272touch /etc/ssh/revoked_keys
8373chmod 600 /etc/ssh/revoked_keys
8474
85- cat /dev/null > /var/log/lastlog
86- cat /dev/null > /var/log/wtmp
87-
8875# Securely erase the unused portion of the filesystem
8976GREEN=' \033[0;32m'
9077NC=' \033[0m'
@@ -103,5 +90,4 @@ dd if=/dev/zero of=/zerofile &
10390 sleep 5
10491 done
10592sync; rm /zerofile; sync
106-
107- fstrim /
93+ cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp
You can’t perform that action at this time.
0 commit comments