aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/InstallItAll.sh
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-08 22:25:33 +1000
committerDavid Walter Seikel2016-11-08 22:25:33 +1000
commit50200d7d232cb24b93b1e71b4a376ccbf8dbabd9 (patch)
treeca1c89d552470369506cab9e1a5ab9275173f98a /InstallItAll.sh
parentInstallation script. (diff)
downloadopensim-SC_OLD-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.zip
opensim-SC_OLD-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.gz
opensim-SC_OLD-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.bz2
opensim-SC_OLD-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.xz
Install script links properly.
Diffstat (limited to 'InstallItAll.sh')
-rwxr-xr-xInstallItAll.sh32
1 files changed, 21 insertions, 11 deletions
diff --git a/InstallItAll.sh b/InstallItAll.sh
index e421d09..ab1074d 100755
--- a/InstallItAll.sh
+++ b/InstallItAll.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2 2
3OSPATH="/opt/opensim" 3OSPATH="/opt/opensim_TEST"
4MYSQL_HOST="localhost" 4MYSQL_HOST="localhost"
5MYSQL_DB="InfiniteGrid" 5MYSQL_DB="InfiniteGrid"
6MYSQL_USER="opensim" 6MYSQL_USER="opensim"
@@ -51,18 +51,18 @@ fi
51USER=$(whoami) 51USER=$(whoami)
52 52
53echo "Installing software." 53echo "Installing software."
54sudo apt-get install mysql-server tmux mono-complete uuid-runtime monit mc 54#sudo apt-get install mysql-server tmux mono-complete uuid-runtime monit mc
55sudo /etc/init.d/mysql restart 55#sudo /etc/init.d/mysql restart
56 56
57echo "Setting up mySQL." 57echo "Setting up mySQL."
58mysql -u root -p -h localhost << zzzzEOFzzz 58#mysql -u root -p -h localhost << zzzzEOFzzz
59create database if not exists '$MYSQL_DB'; 59#create database if not exists '$MYSQL_DB';
60create user '$OS_USER' identified by '$MYSQL_PASSWORD'; 60#create user '$OS_USER' identified by '$MYSQL_PASSWORD';
61create user '$OS_USER'@'localhost' identified by '$MYSQL_PASSWORD'; 61#create user '$OS_USER'@'localhost' identified by '$MYSQL_PASSWORD';
62grant all on $MYSQL_DB.* to '$OS_USER'; 62#grant all on $MYSQL_DB.* to '$OS_USER';
63grant all on $MYSQL_DB.* to '$OS_USER'@'localhost'; 63#grant all on $MYSQL_DB.* to '$OS_USER'@'localhost';
64FLUSH PRIVILEGES; 64#FLUSH PRIVILEGES;
65zzzzEOFzzz 65#zzzzEOFzzz
66 66
67echo "Setting up OpenSim." 67echo "Setting up OpenSim."
68sudo adduser --system --shell /bin/false --group $OS_USER 68sudo adduser --system --shell /bin/false --group $OS_USER
@@ -96,6 +96,16 @@ do
96 sudo ln -fs ../$dir $dir 96 sudo ln -fs ../$dir $dir
97done 97done
98 98
99pushd config/ROBUST >/dev/null
100sudo ln -fs ../../current/scripts/start-sim start-sim
101sudo ln -fs ../../current/scripts/start-sim stop-sim
102popd >/dev/null
103pushd config/sim01 >/dev/null
104sudo ln -fs ../../current/scripts/start-sim backup-sim
105sudo ln -fs ../../current/scripts/start-sim start-sim
106sudo ln -fs ../../current/scripts/start-sim stop-sim
107popd >/dev/null
108
99sudo sed -i "s@MYSQL_HOST@${MYSQL_HOST}@g" config/config.ini 109sudo sed -i "s@MYSQL_HOST@${MYSQL_HOST}@g" config/config.ini
100sudo sed -i "s@MYSQL_DB@${MYSQL_DB}@g" config/config.ini 110sudo sed -i "s@MYSQL_DB@${MYSQL_DB}@g" config/config.ini
101sudo sed -i "s@MYSQL_USER@${MYSQL_USER}@g" config/config.ini 111sudo sed -i "s@MYSQL_USER@${MYSQL_USER}@g" config/config.ini