diff options
Diffstat (limited to 'InstallItAll.sh')
-rwxr-xr-x | InstallItAll.sh | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/InstallItAll.sh b/InstallItAll.sh index ab1074d..124fd5a 100755 --- a/InstallItAll.sh +++ b/InstallItAll.sh | |||
@@ -1,12 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | OSPATH="/opt/opensim_TEST" | 3 | OSPATH="/opt/opensim" |
4 | MYSQL_HOST="localhost" | 4 | MYSQL_HOST="localhost" |
5 | MYSQL_DB="InfiniteGrid" | 5 | MYSQL_DB="InfiniteGrid" |
6 | MYSQL_USER="opensim" | 6 | MYSQL_USER="opensim" |
7 | OS_USER="opensim" | 7 | OS_USER="opensim" |
8 | 8 | ||
9 | OSVER="8.2.1" | 9 | OSVER="0.8.2.1" |
10 | 10 | ||
11 | 11 | ||
12 | # Figure out where we are, most of this mess is to troll through soft links. | 12 | # Figure out where we are, most of this mess is to troll through soft links. |
@@ -51,21 +51,21 @@ 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 nant nunit 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/bash --group $OS_USER |
69 | sudo addgroup $USER $OS_USER | 69 | sudo addgroup $USER $OS_USER |
70 | 70 | ||
71 | sudo rm -fr $OSPATH/opensim-IG_* | 71 | sudo rm -fr $OSPATH/opensim-IG_* |
@@ -85,9 +85,6 @@ sudo chmod -R g+w $OSPATH | |||
85 | sudo chmod -R a+x $OSPATH/current/scripts/*.sh | 85 | sudo chmod -R a+x $OSPATH/current/scripts/*.sh |
86 | sudo chmod a+x $OSPATH/current/scripts/show-console | 86 | sudo chmod a+x $OSPATH/current/scripts/show-console |
87 | sudo chmod a+x $OSPATH/current/scripts/start-sim | 87 | sudo chmod a+x $OSPATH/current/scripts/start-sim |
88 | sudo chmod ug+rwx config | ||
89 | sudo chmod g+s config | ||
90 | sudo chmod 600 config/config.ini | ||
91 | 88 | ||
92 | for dir in AssetFiles backups caches config db logs | 89 | for dir in AssetFiles backups caches config db logs |
93 | do | 90 | do |
@@ -96,11 +93,17 @@ do | |||
96 | sudo ln -fs ../$dir $dir | 93 | sudo ln -fs ../$dir $dir |
97 | done | 94 | done |
98 | 95 | ||
96 | sudo chmod ug+rwx $OSPATH/config | ||
97 | sudo chmod g+s $OSPATH/config | ||
98 | sudo chmod 600 $OSPATH/config/config.ini | ||
99 | |||
99 | pushd config/ROBUST >/dev/null | 100 | pushd config/ROBUST >/dev/null |
101 | sudo ln -fs ../../current/scripts/common.sh common.sh | ||
100 | sudo ln -fs ../../current/scripts/start-sim start-sim | 102 | sudo ln -fs ../../current/scripts/start-sim start-sim |
101 | sudo ln -fs ../../current/scripts/start-sim stop-sim | 103 | sudo ln -fs ../../current/scripts/start-sim stop-sim |
102 | popd >/dev/null | 104 | popd >/dev/null |
103 | pushd config/sim01 >/dev/null | 105 | pushd config/sim01 >/dev/null |
106 | sudo ln -fs ../../current/scripts/common.sh common.sh | ||
104 | sudo ln -fs ../../current/scripts/start-sim backup-sim | 107 | sudo ln -fs ../../current/scripts/start-sim backup-sim |
105 | sudo ln -fs ../../current/scripts/start-sim start-sim | 108 | sudo ln -fs ../../current/scripts/start-sim start-sim |
106 | sudo ln -fs ../../current/scripts/start-sim stop-sim | 109 | sudo ln -fs ../../current/scripts/start-sim stop-sim |
@@ -118,4 +121,3 @@ sudo chown $USER /home/$OS_USER/.tmux.conf | |||
118 | sudo chmod 644 /home/$OS_USER/.tmux.conf | 121 | sudo chmod 644 /home/$OS_USER/.tmux.conf |
119 | 122 | ||
120 | sudo scripts/fix_var_run.sh | 123 | sudo scripts/fix_var_run.sh |
121 | sudo cat scripts/opensim-crontab.txt | sudo crontab -u $OS_USER - | ||