From b6b38dd4206c35dec02edd7bbfd9a0545fc12df6 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 4 Aug 2019 01:50:56 +1000 Subject: Tweaking create_sim. ExternalHostName = "${Const|HostName}" Move size to the third argument. --- scripts/install/create_sim.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'scripts/install/create_sim.sh') 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 NAME=$1 LOCATION=$2 -URL=$3 +SIZE=$3 IP=$4 -SIZE=$5 cd ${OS_PATH}/config @@ -35,6 +34,11 @@ then echo "WARNING setting the Location to ${LOCATION}, this may not be what you want." fi +if [ "x${SIZE}" = "x" ] +then + SIZE="256" +fi + if [ "x${IP}" = "x" ] then IP="0.0.0.0" @@ -43,19 +47,6 @@ then # According to the OpenSim docs, 0.0.0.0 means to listen on all NICs the machine has, which should work fine. fi -if [ "x${URL}" = "x" ] -then -# Here we make use of an external IP finding service. Careful, it may move. -# 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. - URL="SYSTEMIP" - echo "WARNING setting the ExternalHostName to ${URL}, this may not be what you want." -fi - -if [ "x${SIZE}" = "x" ] -then - SIZE="256" -fi - # Wow, the hoops we have to jump through to avoid octal. if [ 9 -gt $k ]; then NUM=$(printf '0%1s' $(( 10#$k + 1 )) ) @@ -76,7 +67,6 @@ sed -i "s@SIM_UUID@${UUID}@g" ThisSim.ini sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini sed -i "s@SIM_IP@${IP}@g" ThisSim.ini sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini -sed -i "s@SIM_URL@${URL}@g" ThisSim.ini sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini ln -s ../../current/scripts/common.sh common.sh -- cgit v1.1