From 6b3704dff833a3ccf89f623598ca48d7e0c33c6f Mon Sep 17 00:00:00 2001 From: lickx Date: Wed, 1 Mar 2023 11:33:26 +0100 Subject: [PATCH] Implement per sim ini overrides, closes #23 --- bin/simctl | 6 ++++++ share/system/opensim.ini | 2 ++ 2 files changed, 8 insertions(+) diff --git a/bin/simctl b/bin/simctl index 39024af..b14ec3c 100755 --- a/bin/simctl +++ b/bin/simctl @@ -117,6 +117,7 @@ setup() { else SIM=$1 fi + export SIM REGION_INIFILE="${OPENSIM_DIR}/etc/sims-available/${SIM}.ini" @@ -181,6 +182,11 @@ do_start() { fi fi + # Make local configuration folder for sims if not existing + if [ ! -d "${OPENSIM_DIR}/etc/sims-local.d" ]; then + mkdir "${OPENSIM_DIR}/etc/sims-local.d" + fi + # Change UDP region port to match TCP sim port sed -i --follow-symlinks -e "s/InternalPort.*/InternalPort = ${ISTHMUS_PORT}/" "${REGIONS_DIR}/${SIM}.ini" diff --git a/share/system/opensim.ini b/share/system/opensim.ini index ac8e9e8..e6b0a93 100644 --- a/share/system/opensim.ini +++ b/share/system/opensim.ini @@ -8,6 +8,7 @@ ISTHMUS_PORT="" ISTHMUS_PIDFILE="" ISTHMUS_LOGFILE="" REGION_LOAD_DIR="" +SIM="" [Startup] regionload_regionsdir="${Environment|REGION_LOAD_DIR}" @@ -102,4 +103,5 @@ Include-Estates = "../../etc/estate.ini" Include-osslEnable = "../../share/system/osslDefaultEnable.ini" Include-DatabaseService = "../../etc/database.ini" Include-Grid = "../../etc/grid.ini" +Include-SimLocal = "../../etc/sims-local.d/${Environment|SIM}.ini" Include-Local = "../../etc/local.ini"