aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/install_opensim.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install_opensim.sh')
-rwxr-xr-xinstall_opensim.sh81
1 files changed, 48 insertions, 33 deletions
diff --git a/install_opensim.sh b/install_opensim.sh
index 0800523..4163132 100755
--- a/install_opensim.sh
+++ b/install_opensim.sh
@@ -6,6 +6,10 @@ then
6else 6else
7 MYSQL_PASSWORD=$1 7 MYSQL_PASSWORD=$1
8fi 8fi
9REST_USER="RestingUser"
10REST_PASSWORD="SecretRestingPlace"
11
12OSPATH="/opt/opensim"
9USER=$(whoami) 13USER=$(whoami)
10VERSION_CONTROL="off" 14VERSION_CONTROL="off"
11 15
@@ -36,41 +40,33 @@ sudo chmod 757 /var/log/opensim
36sudo mkdir -p /var/run/opensim 40sudo mkdir -p /var/run/opensim
37sudo chown opensim:opensim /var/run/opensim 41sudo chown opensim:opensim /var/run/opensim
38sudo chmod 757 /var/run/opensim 42sudo chmod 757 /var/run/opensim
39sudo mkdir -p /opt/opensim/config /opt/opensim/modules /opt/opensim/setup 43sudo mkdir -p $OSPATH/config $OSPATH/setup $OSPATH/caches/assetcache
40sudo chown opensim:opensim /opt/opensim 44sudo chown opensim:opensim $OSPATH
41sudo chown -R opensim:opensim /opt/opensim 45sudo chown -R opensim:opensim $OSPATH
42sudo chmod -R 757 /opt/opensim 46sudo chmod -R 757 $OSPATH
43cp start-sim-in-rest /opt/opensim/setup 47cp * $OSPATH/setup
44cp opensim-monit.conf /opt/opensim/setup 48cp common.ini $OSPATH/config
49sed -i "s@MYSQL_PASSWORD@$MYSQL_PASSWORD@g" $OSPATH/config/common.ini
50sed -i "s@REST_PASSWORD@$REST_PASSWORD@g" $OSPATH/config/common.ini
51sed -i "s@REST_USER@$REST_USER@g" $OSPATH/config/common.ini
45cat opensim-crontab.txt | sudo crontab -u opensim - 52cat opensim-crontab.txt | sudo crontab -u opensim -
46 53
47cd /opt/opensim 54cd $OSPATH
48if [ ! -e opensim-0.7.1.1-infinitegrid-03.tar.bz2 ] 55if [ ! -e opensim-0.7.1.1-infinitegrid-03.tar.bz2 ]
49then 56then
50 wget https://github.com/downloads/infinitegrid/InfiniteGrid-Opensim/opensim-0.7.1.1-infinitegrid-03.tar.bz2 57 wget https://github.com/downloads/infinitegrid/InfiniteGrid-Opensim/opensim-0.7.1.1-infinitegrid-03.tar.bz2
51fi 58fi
52
53if [ ! -e opensim-0.7.1.1-infinitegrid-03 ] 59if [ ! -e opensim-0.7.1.1-infinitegrid-03 ]
54then 60then
55 tar xjf opensim-0.7.1.1-infinitegrid-03.tar.bz2 61 tar xjf opensim-0.7.1.1-infinitegrid-03.tar.bz2
56fi 62fi
57ln -fs opensim-0.7.1.1-infinitegrid-03 current 63ln -fs opensim-0.7.1.1-infinitegrid-03 current
58 64
59cd current/bin 65# Create the REST client config file.
60mv -f OpenSim.Forge.Currency.dll ../../modules/ 66cat > config/OpenSim.ConsoleClient.ini << zzzzEOFzzzz
61ln -fs ../../modules/OpenSim.Forge.Currency.dll OpenSim.Forge.Currency.dll
62mv -f OpenSimSearch.Modules.dll ../../modules/
63ln -fs ../../modules/OpenSimSearch.Modules.dll OpenSimSearch.Modules.dll
64mv -f NSLModules.Messaging.MuteList.dll ../../modules/
65ln -fs ../../modules/NSLModules.Messaging.MuteList.dll NSLModules.Messaging.MuteList.dll
66mv -f OpenSimProfile.Modules.dll ../../modules/
67ln -fs ../../modules/OpenSimProfile.Modules.dll OpenSimProfile.Modules.dll
68ln -fs ../../config config
69
70cat > OpenSim.ConsoleClient.ini << zzzzEOFzzzz
71[Startup] 67[Startup]
72 ; Set here or use the -user command-line switch 68 ; Set here or use the -user command-line switch
73 user = RestingUser 69 user = $REST_USER
74 70
75 ; Set here or use the -host command-line switch 71 ; Set here or use the -host command-line switch
76 host = localhost 72 host = localhost
@@ -81,18 +77,37 @@ cat > OpenSim.ConsoleClient.ini << zzzzEOFzzzz
81 ; Set here or use the -pass command-line switch 77 ; Set here or use the -pass command-line switch
82 ; Please be aware that this is not secure since the password is in the clear 78 ; Please be aware that this is not secure since the password is in the clear
83 ; we recommend the use of -pass wherever possible 79 ; we recommend the use of -pass wherever possible
84 pass = SecretRestingPLace 80 pass = $REST_PASSWORD
85zzzzEOFzzzz 81zzzzEOFzzzz
86 82
87sed -i 's@<appender name="LogFileAppender" type="log4net.Appender.FileAppender">@<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">@' OpenSim.exe.config 83cd current/bin
88sed -i 's@; ConsoleUser = "Test"@ConsoleUser = "RestingUser"@' OpenSim.ini 84# Not sure why we are moving these. Hopefully we can get rid of having to move them.
89sed -i 's@; ConsolePass = "secret"@ConsolePass = "SecretRestingPlace"@' OpenSim.ini 85# Comenting them out, until Alice or Rizzy remember why they seed to be moved. See if things still work.
86#mv -f OpenSim.Forge.Currency.dll ../../modules/
87#ln -fs ../../modules/OpenSim.Forge.Currency.dll OpenSim.Forge.Currency.dll
88#mv -f OpenSimSearch.Modules.dll ../../modules/
89#ln -fs ../../modules/OpenSimSearch.Modules.dll OpenSimSearch.Modules.dll
90#mv -f NSLModules.Messaging.MuteList.dll ../../modules/
91#ln -fs ../../modules/NSLModules.Messaging.MuteList.dll NSLModules.Messaging.MuteList.dll
92#mv -f OpenSimProfile.Modules.dll ../../modules/
93#ln -fs ../../modules/OpenSimProfile.Modules.dll OpenSimProfile.Modules.dll
94
95ln -fs ../../config config
96mv -f addon-modules ../../config
97ln -fs ../../config/addon-modules addon-modules
98
99# Try to make the OS distro directory suited to being read only.
100ln -fs ../../caches caches
101mv -f ScriptEngines ../../caches
102ln -fs ../../caches/ScriptEngines ScriptEngines
103# Grumble, OS has it's own silly ideas, and recreates this.
104# "Cannot create /opt/opensim/opensim-0.7.1.1-infinitegrid-03/bin/addin-db-001 because a file with the same name already exists."
105#ln -fs ../../caches/addin-db-001 addin-db-001
90 106
91cd config-include/ 107cd config-include/
108# Damn, can't overide these, we could change them for the next IG OS release.
92sed -i 's@Include-Storage = "config-include/storage/SQLiteStandalone.ini";@; Include-Storage = "config-include/storage/SQLiteStandalone.ini";@' GridCommon.ini 109sed -i 's@Include-Storage = "config-include/storage/SQLiteStandalone.ini";@; Include-Storage = "config-include/storage/SQLiteStandalone.ini";@' GridCommon.ini
93sed -i 's@; StorageProvider = "OpenSim.Data.MySQL.dll"@StorageProvider = "OpenSim.Data.MySQL.dll"@' GridCommon.ini 110sed -i 's@CacheDirectory = ./assetcache@CacheDirectory = caches/assetcache@' FlotsamCache.ini
94sed -i "s@; ConnectionString = \"Data Source=localhost;Database=opensim;User ID=opensim;Password=\*\*\*\*;\"@ConnectionString = \"Data Source=localhost;Database=opensim;User ID=opensim;Password=$MYSQL_PASSWORD;\"@" GridCommon.ini
95
96cd ../../.. 111cd ../../..
97 112
98# Setting screen to be suid. EWWWWWW!!! Security hole!! 113# Setting screen to be suid. EWWWWWW!!! Security hole!!
@@ -105,9 +120,9 @@ then
105 sudo chown root:utmp /var/run/screen 120 sudo chown root:utmp /var/run/screen
106fi 121fi
107 122
108sudo chown -R opensim:opensim /opt/opensim 123sudo chown -R opensim:opensim $OSPATH
109sudo chmod -R a-x /opt/opensim 124sudo chmod -R a-x $OSPATH
110sudo chmod -R a+X /opt/opensim 125sudo chmod -R a+X $OSPATH
111sudo chmod -R g+w /opt/opensim 126sudo chmod -R g+w $OSPATH
112sudo chmod a+x /opt/opensim/setup/start-sim-in-rest 127sudo chmod a+x $OSPATH/setup/start-sim
113 128