opensim-tools – Rev
?pathlinks?
#!/bin/bash
###########################################################################
## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ##
## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
## rights of fair usage, the disclaimer and warranty conditions. ##
###########################################################################
# clear log files
find /var/log/ -type f -exec truncate --size 0 '{}' \;
# clear backup files
find / -name *~ -exec rm -rf '{}' \;
# clear svn
su root -c "rm -rf ~/.subversion"
# dump database
mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim';
mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'create database opensim';
# clear history
su root -c "history -c && rm -rf ~/.bash_history"
su opensim -c "history -c && rm -rf ~/.bash_history"
#halt -p