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