diff options
author | David Walter Seikel | 2016-11-08 22:25:33 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-08 22:25:33 +1000 |
commit | 50200d7d232cb24b93b1e71b4a376ccbf8dbabd9 (patch) | |
tree | ca1c89d552470369506cab9e1a5ab9275173f98a /InstallItAll.sh | |
parent | Installation script. (diff) | |
download | opensim-SC-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.zip opensim-SC-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.gz opensim-SC-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.bz2 opensim-SC-50200d7d232cb24b93b1e71b4a376ccbf8dbabd9.tar.xz |
Install script links properly.
Diffstat (limited to '')
-rwxr-xr-x | InstallItAll.sh | 32 |
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 | ||
3 | OSPATH="/opt/opensim" | 3 | OSPATH="/opt/opensim_TEST" |
4 | MYSQL_HOST="localhost" | 4 | MYSQL_HOST="localhost" |
5 | MYSQL_DB="InfiniteGrid" | 5 | MYSQL_DB="InfiniteGrid" |
6 | MYSQL_USER="opensim" | 6 | MYSQL_USER="opensim" |
@@ -51,18 +51,18 @@ fi | |||
51 | USER=$(whoami) | 51 | USER=$(whoami) |
52 | 52 | ||
53 | echo "Installing software." | 53 | echo "Installing software." |
54 | sudo 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 |
55 | sudo /etc/init.d/mysql restart | 55 | #sudo /etc/init.d/mysql restart |
56 | 56 | ||
57 | echo "Setting up mySQL." | 57 | echo "Setting up mySQL." |
58 | mysql -u root -p -h localhost << zzzzEOFzzz | 58 | #mysql -u root -p -h localhost << zzzzEOFzzz |
59 | create database if not exists '$MYSQL_DB'; | 59 | #create database if not exists '$MYSQL_DB'; |
60 | create user '$OS_USER' identified by '$MYSQL_PASSWORD'; | 60 | #create user '$OS_USER' identified by '$MYSQL_PASSWORD'; |
61 | create user '$OS_USER'@'localhost' identified by '$MYSQL_PASSWORD'; | 61 | #create user '$OS_USER'@'localhost' identified by '$MYSQL_PASSWORD'; |
62 | grant all on $MYSQL_DB.* to '$OS_USER'; | 62 | #grant all on $MYSQL_DB.* to '$OS_USER'; |
63 | grant all on $MYSQL_DB.* to '$OS_USER'@'localhost'; | 63 | #grant all on $MYSQL_DB.* to '$OS_USER'@'localhost'; |
64 | FLUSH PRIVILEGES; | 64 | #FLUSH PRIVILEGES; |
65 | zzzzEOFzzz | 65 | #zzzzEOFzzz |
66 | 66 | ||
67 | echo "Setting up OpenSim." | 67 | echo "Setting up OpenSim." |
68 | sudo adduser --system --shell /bin/false --group $OS_USER | 68 | sudo 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 |
97 | done | 97 | done |
98 | 98 | ||
99 | pushd config/ROBUST >/dev/null | ||
100 | sudo ln -fs ../../current/scripts/start-sim start-sim | ||
101 | sudo ln -fs ../../current/scripts/start-sim stop-sim | ||
102 | popd >/dev/null | ||
103 | pushd config/sim01 >/dev/null | ||
104 | sudo ln -fs ../../current/scripts/start-sim backup-sim | ||
105 | sudo ln -fs ../../current/scripts/start-sim start-sim | ||
106 | sudo ln -fs ../../current/scripts/start-sim stop-sim | ||
107 | popd >/dev/null | ||
108 | |||
99 | sudo sed -i "s@MYSQL_HOST@${MYSQL_HOST}@g" config/config.ini | 109 | sudo sed -i "s@MYSQL_HOST@${MYSQL_HOST}@g" config/config.ini |
100 | sudo sed -i "s@MYSQL_DB@${MYSQL_DB}@g" config/config.ini | 110 | sudo sed -i "s@MYSQL_DB@${MYSQL_DB}@g" config/config.ini |
101 | sudo sed -i "s@MYSQL_USER@${MYSQL_USER}@g" config/config.ini | 111 | sudo sed -i "s@MYSQL_USER@${MYSQL_USER}@g" config/config.ini |