2015-11-27 09:17:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
/sbin/service rsyslog stop
|
|
|
|
/sbin/service auditd stop
|
|
|
|
/bin/package-cleanup --oldkernels --count=1 -y
|
|
|
|
/usr/bin/yum clean all
|
2015-11-27 10:46:52 +00:00
|
|
|
/usr/sbin/logrotate -f /etc/logrotate.conf
|
|
|
|
/bin/rm -f /var/log/*-???????? /var/log/*.gz
|
2015-11-27 09:17:13 +00:00
|
|
|
/bin/rm -f /var/log/dmesg.old
|
|
|
|
/bin/rm -rf /var/log/anaconda
|
|
|
|
/bin/cat /dev/null > /var/log/audit/audit.log
|
|
|
|
/bin/cat /dev/null > /var/log/wtmp
|
|
|
|
/bin/cat /dev/null > /var/log/lastlog
|
|
|
|
/bin/cat /dev/null > /var/log/grubby
|
|
|
|
/bin/rm -f /etc/udev/rules.d/70*
|
2015-11-27 10:46:52 +00:00
|
|
|
/bin/sed -i '/^(HWADDR|UUID)=/d' /etc/sysconfig/network-scripts/ifcfg-eth0
|
|
|
|
/bin/rm -rf /tmp/*
|
|
|
|
/bin/rm -rf /var/tmp/*
|
|
|
|
/bin/rm -f /etc/ssh/*key*
|
2015-11-27 09:17:13 +00:00
|
|
|
/bin/rm -f ~root/.bash_history
|
|
|
|
unset HISTFILE
|
|
|
|
/bin/rm -rf ~root/.ssh/
|
|
|
|
/bin/rm -f ~root/anaconda-ks.cfg
|