aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/install
diff options
context:
space:
mode:
authoronefang2019-08-04 01:50:56 +1000
committeronefang2019-08-04 01:50:56 +1000
commitb6b38dd4206c35dec02edd7bbfd9a0545fc12df6 (patch)
tree7bccfb31c8eab8b571c15b895b7f18817aa9ee27 /scripts/install
parentHypergridders have their full name in firstname, and their grid in lastname. ... (diff)
downloadopensim-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 '')
-rwxr-xr-xscripts/install/create_sim.sh22
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
6NAME=$1 6NAME=$1
7LOCATION=$2 7LOCATION=$2
8URL=$3 8SIZE=$3
9IP=$4 9IP=$4
10SIZE=$5
11 10
12cd ${OS_PATH}/config 11cd ${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."
36fi 35fi
37 36
37if [ "x${SIZE}" = "x" ]
38then
39 SIZE="256"
40fi
41
38if [ "x${IP}" = "x" ] 42if [ "x${IP}" = "x" ]
39then 43then
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.
44fi 48fi
45 49
46if [ "x${URL}" = "x" ]
47then
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."
52fi
53
54if [ "x${SIZE}" = "x" ]
55then
56 SIZE="256"
57fi
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.
60if [ 9 -gt $k ]; then 51if [ 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
76sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini 67sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini
77sed -i "s@SIM_IP@${IP}@g" ThisSim.ini 68sed -i "s@SIM_IP@${IP}@g" ThisSim.ini
78sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini 69sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini
79sed -i "s@SIM_URL@${URL}@g" ThisSim.ini
80sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini 70sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini
81 71
82ln -s ../../current/scripts/common.sh common.sh 72ln -s ../../current/scripts/common.sh common.sh