diff options
author | onefang | 2019-08-04 01:50:56 +1000 |
---|---|---|
committer | onefang | 2019-08-04 01:50:56 +1000 |
commit | b6b38dd4206c35dec02edd7bbfd9a0545fc12df6 (patch) | |
tree | 7bccfb31c8eab8b571c15b895b7f18817aa9ee27 /scripts/install | |
parent | Hypergridders have their full name in firstname, and their grid in lastname. ... (diff) | |
download | opensim-SC_OLD-b6b38dd4206c35dec02edd7bbfd9a0545fc12df6.zip opensim-SC_OLD-b6b38dd4206c35dec02edd7bbfd9a0545fc12df6.tar.gz opensim-SC_OLD-b6b38dd4206c35dec02edd7bbfd9a0545fc12df6.tar.bz2 opensim-SC_OLD-b6b38dd4206c35dec02edd7bbfd9a0545fc12df6.tar.xz |
Tweaking create_sim.
ExternalHostName = "${Const|HostName}"
Move size to the third argument.
Diffstat (limited to 'scripts/install')
-rwxr-xr-x | scripts/install/create_sim.sh | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/scripts/install/create_sim.sh b/scripts/install/create_sim.sh index 16b668a..055f802 100755 --- a/scripts/install/create_sim.sh +++ b/scripts/install/create_sim.sh | |||
@@ -5,9 +5,8 @@ getPrgDir | |||
5 | 5 | ||
6 | NAME=$1 | 6 | NAME=$1 |
7 | LOCATION=$2 | 7 | LOCATION=$2 |
8 | URL=$3 | 8 | SIZE=$3 |
9 | IP=$4 | 9 | IP=$4 |
10 | SIZE=$5 | ||
11 | 10 | ||
12 | cd ${OS_PATH}/config | 11 | cd ${OS_PATH}/config |
13 | 12 | ||
@@ -35,6 +34,11 @@ then | |||
35 | echo "WARNING setting the Location to ${LOCATION}, this may not be what you want." | 34 | echo "WARNING setting the Location to ${LOCATION}, this may not be what you want." |
36 | fi | 35 | fi |
37 | 36 | ||
37 | if [ "x${SIZE}" = "x" ] | ||
38 | then | ||
39 | SIZE="256" | ||
40 | fi | ||
41 | |||
38 | if [ "x${IP}" = "x" ] | 42 | if [ "x${IP}" = "x" ] |
39 | then | 43 | then |
40 | IP="0.0.0.0" | 44 | IP="0.0.0.0" |
@@ -43,19 +47,6 @@ then | |||
43 | # According to the OpenSim docs, 0.0.0.0 means to listen on all NICs the machine has, which should work fine. | 47 | # According to the OpenSim docs, 0.0.0.0 means to listen on all NICs the machine has, which should work fine. |
44 | fi | 48 | fi |
45 | 49 | ||
46 | if [ "x${URL}" = "x" ] | ||
47 | then | ||
48 | # Here we make use of an external IP finding service. Careful, it may move. | ||
49 | # URL=$(wget -q http://automation.whatismyip.com/n09230945.asp -O -) # URL is best (without the HTTP://), but IP (e.g. 88.109.81.55) works too. | ||
50 | URL="SYSTEMIP" | ||
51 | echo "WARNING setting the ExternalHostName to ${URL}, this may not be what you want." | ||
52 | fi | ||
53 | |||
54 | if [ "x${SIZE}" = "x" ] | ||
55 | then | ||
56 | SIZE="256" | ||
57 | fi | ||
58 | |||
59 | # Wow, the hoops we have to jump through to avoid octal. | 50 | # Wow, the hoops we have to jump through to avoid octal. |
60 | if [ 9 -gt $k ]; then | 51 | if [ 9 -gt $k ]; then |
61 | NUM=$(printf '0%1s' $(( 10#$k + 1 )) ) | 52 | NUM=$(printf '0%1s' $(( 10#$k + 1 )) ) |
@@ -76,7 +67,6 @@ sed -i "s@SIM_UUID@${UUID}@g" ThisSim.ini | |||
76 | sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini | 67 | sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini |
77 | sed -i "s@SIM_IP@${IP}@g" ThisSim.ini | 68 | sed -i "s@SIM_IP@${IP}@g" ThisSim.ini |
78 | sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini | 69 | sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini |
79 | sed -i "s@SIM_URL@${URL}@g" ThisSim.ini | ||
80 | sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini | 70 | sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini |
81 | 71 | ||
82 | ln -s ../../current/scripts/common.sh common.sh | 72 | ln -s ../../current/scripts/common.sh common.sh |