Initial
This commit is contained in:
19
roles/base/files/system_setup/image_prep.sh
Normal file
19
roles/base/files/system_setup/image_prep.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#### Clear log files
|
||||
find /var/log -type f -name "*log" -exec truncate -s 0 {} \;
|
||||
truncate -s 0 /var/log/*tmp
|
||||
|
||||
|
||||
#### Clear user files
|
||||
find /home -type f -name .bash_history -exec rm {} \;
|
||||
|
||||
if [ -f /root/.bash_history ]; then
|
||||
rm /root/.bash_history
|
||||
fi
|
||||
|
||||
find /home -type f -name .viminfo -exec rm {} \;
|
||||
if [ -f /root/.viminfo ]; then
|
||||
rm /root/.viminfo
|
||||
fi
|
||||
Reference in New Issue
Block a user