opensim-tools – Diff between revs 38 and 39

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 38 Rev 39
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 IPs
-   9 sed -i "s/ExternalHostNameForLSL *=.*/ExternalHostNameForLSL = \"192.168.0.1\"/g" \
-   10 $DAEMON_DIR/OpenSim.ini;
-   11 sed -i "s/ExternalHostName *=.*/ExternalHostName = 192.168.0.1/g" \
-   12 $REGION_DIR/Regions.ini;
-   13 sed -i "s/HomeURI *=.*/HomeURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   14 $CONFIG_DIR/StandaloneCommon.ini;
-   15 sed -i "s/Gatekeeper *=.*/Gatekeeper = \"http:\/\/192.168.0.1:9000\"/g" \
-   16 $CONFIG_DIR/StandaloneCommon.ini;
-   17 sed -i "s/GatekeeperURI *=.*/GatekeeperURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   18 $CONFIG_DIR/StandaloneCommon.ini;
-   19 sed -i "s/SRV_HomeURI *=.*/SRV_HomeURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   20 $CONFIG_DIR/StandaloneCommon.ini;
-   21 sed -i "s/SRV_InventoryServerURI *=.*/SRV_InventoryServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   22 $CONFIG_DIR/StandaloneCommon.ini;
-   23 sed -i "s/SRV_AssetServerURI *=.*/SRV_AssetServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   24 $CONFIG_DIR/StandaloneCommon.ini;
-   25 sed -i "s/SRV_ProfileServerURI *=.*/SRV_ProfileServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   26 $CONFIG_DIR/StandaloneCommon.ini;
-   27 sed -i "s/SRV_GroupsServerURI *=.*/SRV_GroupsServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   28 $CONFIG_DIR/StandaloneCommon.ini
-   29 sed -i "s/FriendsServerURI *=.*/FriendsServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   30 $CONFIG_DIR/StandaloneCommon.ini;
-   31 sed -i "s/IMServerURI *=.*/IMServerURI = \"http:\/\/192.168.0.1:9000\"/g" \
-   32 $CONFIG_DIR/StandaloneCommon.ini;
-   33 sed -i "s/MapTileURL *=.*/MapTileURL = \"http:\/\/192.168.0.1:9000\"/g" \
-   34 $CONFIG_DIR/StandaloneCommon.ini;
-   35 sed -i "s/ExternalName *=.*/ExternalName = \"http:\/\/192.168.0.1:9000\"/g" \
8 # clear log files 36 $CONFIG_DIR/StandaloneCommon.ini;
-   37 sed -i "s/login *=.*/login = \"http:\/\/192.168.0.1:9000\"/g" \
-   38 $CONFIG_DIR/StandaloneCommon.ini;
-   39 sed -i "s/gridname *=.*/gridname = \"SpectacledOwl\"/g" \
-   40 $CONFIG_DIR/StandaloneCommon.ini;
-   41 sed -i "s/gridnick *=.*/gridnick = \"SpectacledOwl\"/g" \
-   42 $CONFIG_DIR/StandaloneCommon.ini;
-   43 sed -i "s/welcome *=.*/welcome = \"http:\/\/192.168.0.1\/welcome\.php\"/g" \
-   44 $CONFIG_DIR/StandaloneCommon.ini;
-   45 sed -i "s/register *=.*/register = \"http:\/\/192.168.0.1\/register\.php\"/g" \
-   46 $CONFIG_DIR/StandaloneCommon.ini;
-   47 sed -i "s/about *=.*/about = \"http:\/\/192.168.0.1\/about\.php\"/g" \
9 find /var/log/ -type f -exec truncate --size 0 '{}' \; 48 $CONFIG_DIR/StandaloneCommon.ini;
10   49  
11 # clear backup files 50 # clear backup files
12 find / -name *~ -exec rm -rf '{}' \; 51 find / -name *~ -exec rm -rf '{}' \;
13   52  
14 # clear svn 53 # clear svn
15 su root -c "rm -rf ~/.subversion" 54 su root -c "rm -rf ~/.subversion"
16   55  
17 # clear iar/oar 56 # clear iar/oar
18 if [ -d /var/lib/iar/ ]; then 57 if [ -d /var/lib/iar/ ]; then
19 rm -rf /var/lib/iar/* 58 rm -rf /var/lib/iar/*
20 fi 59 fi
21   60  
22 # dump database 61 # dump database
23 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim'; 62 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim';
24 mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'create database opensim'; 63 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 -  
30   64  
31 # clear history 65 # clear history
32 su root -c "history -c && rm -rf /root/.bash_history" 66 su root -c "history -c && rm -rf /root/.bash_history"
33 su opensim -c "history -c && rm -rf /home/opensim/.bash_history" 67 su opensim -c "history -c && rm -rf /home/opensim/.bash_history"
34   68  
35 halt -p 69 halt -p
36   70