opensim-tools – Diff between revs 37 and 38

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 37 Rev 38
1 #!/bin/bash 1 #!/bin/bash
2 ########################################################################### 2 ###########################################################################
3 ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ## 3 ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ##
4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## 4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
5 ## rights of fair usage, the disclaimer and warranty conditions. ## 5 ## rights of fair usage, the disclaimer and warranty conditions. ##
6 ########################################################################### 6 ###########################################################################
7   7  
8 # clear log files 8 # clear log files
9 find /var/log/ -type f -exec truncate --size 0 '{}' \; 9 find /var/log/ -type f -exec truncate --size 0 '{}' \;
10   10  
11 # clear backup files 11 # clear backup files
12 find / -name *~ -exec rm -rf '{}' \; 12 find / -name *~ -exec rm -rf '{}' \;
13   13  
14 # clear svn 14 # clear svn
15 su root -c "rm -rf ~/.subversion" 15 su root -c "rm -rf ~/.subversion"
16   16  
17 # clear iar/oar 17 # clear iar/oar
18 if [ -d /var/lib/iar/ ]; then 18 if [ -d /var/lib/iar/ ]; then
19 rm -rf /var/lib/iar/* 19 rm -rf /var/lib/iar/*
20 fi 20 fi
21   21  
22 # dump database 22 # dump database
23 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim'; 23 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim';
24 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'create database opensim'; 24 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'create database opensim';
-   25  
-   26 dialog --msgbox "Please type in a new root password at the next prompt." 10 70
-   27 passwd root
-   28 dialog --msgbox "Please type in a new opensim user password at the next prompt." 10 70
-   29 passwd opensim
25   30  
26 # clear history 31 # clear history
27 su root -c "history -c && rm -rf /root/.bash_history" 32 su root -c "history -c && rm -rf /root/.bash_history"
28 su opensim -c "history -c && rm -rf /home/opensim/.bash_history" 33 su opensim -c "history -c && rm -rf /home/opensim/.bash_history"
29   34  
30 halt -p 35 halt -p
31   36