diff options
author | onefang | 2019-05-28 06:19:38 +1000 |
---|---|---|
committer | onefang | 2019-05-28 06:19:38 +1000 |
commit | f921cb712e67893b44496192e5297335ed65caf7 (patch) | |
tree | b3b2782530414e23400f10ecc5b718682d2745b1 /scripts | |
parent | Management scripts encounters the real world, needs patching up. (diff) | |
download | opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.zip opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.gz opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.bz2 opensim-SC_OLD-f921cb712e67893b44496192e5297335ed65caf7.tar.xz |
Add [Region] .ini block.
For including actual region definition in the normal .ini stack.
Same as the usual Region.ini format, except we add a RegionName
parameter.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/common.sh | 4 | ||||
-rwxr-xr-x | scripts/install/create_sim.sh | 15 | ||||
-rwxr-xr-x | scripts/start-sim | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/scripts/common.sh b/scripts/common.sh index c5a86ab..9d985f2 100755 --- a/scripts/common.sh +++ b/scripts/common.sh | |||
@@ -42,11 +42,11 @@ sanitize() | |||
42 | } | 42 | } |
43 | 43 | ||
44 | 44 | ||
45 | # Grab the first Section line of the sims .xml file, cut it down to the name. | 45 | # Grab the first Section line of the sims .ini file, cut it down to the name. |
46 | # name=$(getSimName 1) | 46 | # name=$(getSimName 1) |
47 | getSimName() | 47 | getSimName() |
48 | { | 48 | { |
49 | grep "<Section " ${PRGDIR}/../../config/$(num2name $1)/*.xml | head -n 1 | cut -d '"' -f 2 | 49 | grep "RegionName" ${PRGDIR}/../../config/$(num2name $1)/*.ini | head -n 1 | cut -d '"' -f 2 |
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
diff --git a/scripts/install/create_sim.sh b/scripts/install/create_sim.sh index 08cedba..475c127 100755 --- a/scripts/install/create_sim.sh +++ b/scripts/install/create_sim.sh | |||
@@ -71,14 +71,13 @@ echo "Creating sim${NUM} on port ${PORT} @ ${LOCATION} - ${NAME}." | |||
71 | cp -r sim_skeleton sim${NUM} | 71 | cp -r sim_skeleton sim${NUM} |
72 | 72 | ||
73 | cd sim${NUM} | 73 | cd sim${NUM} |
74 | mv My_sim.xml ${sim}.xml | 74 | sed -i "s@SIM_NAME@${NAME}@g" ThisSim.ini |
75 | sed -i "s@SIM_NAME@${NAME}@g" ${sim}.xml | 75 | sed -i "s@SIM_UUID@${UUID}@g" ThisSim.ini |
76 | sed -i "s@SIM_UUID@${UUID}@g" ${sim}.xml | 76 | sed -i "s@SIM_POS@${LOCATION}@g" ThisSim.ini |
77 | sed -i "s@SIM_POS@${LOCATION}@g" ${sim}.xml | 77 | sed -i "s@SIM_IP@${IP}@g" ThisSim.ini |
78 | sed -i "s@SIM_IP@${IP}@g" ${sim}.xml | 78 | sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ThisSim.ini |
79 | sed -i "s@SIM_INT_PORT@$(( ${PORT} + 1 ))@g" ${sim}.xml | 79 | sed -i "s@SIM_URL@${URL}@g" ThisSim.ini |
80 | sed -i "s@SIM_URL@${URL}@g" ${sim}.xml | 80 | sed -i "s@SIM_SIZE@${SIZE}@g" ThisSim.ini |
81 | sed -i "s@SIM_SIZE@${SIZE}@g" ${sim}.xml | ||
82 | 81 | ||
83 | ln -s ../../current/scripts/common.sh common.sh | 82 | ln -s ../../current/scripts/common.sh common.sh |
84 | ln -s ../../current/scripts/start-sim start-sim | 83 | ln -s ../../current/scripts/start-sim start-sim |
diff --git a/scripts/start-sim b/scripts/start-sim index 3c6370f..4bcc803 100755 --- a/scripts/start-sim +++ b/scripts/start-sim | |||
@@ -71,7 +71,7 @@ if [ "x$tgt" = "xROBUST" ]; then | |||
71 | title="ROBUST" | 71 | title="ROBUST" |
72 | elif [ "x$inventory" = "x" ]; then | 72 | elif [ "x$inventory" = "x" ]; then |
73 | exe="OpenSim" | 73 | exe="OpenSim" |
74 | # Grab the first Section line of the sims .xml file, cut it down to the name. | 74 | # Grab the first RegionName line of the sims .ini file, cut it down to the name. |
75 | title=$(getSimName ${num}) | 75 | title=$(getSimName ${num}) |
76 | fi | 76 | fi |
77 | 77 | ||