Skip to content

Commit

Permalink
Implement per sim ini overrides, closes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
lickx committed Mar 1, 2023
1 parent 7a40784 commit 6b3704d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/simctl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ setup() {
else
SIM=$1
fi
export SIM

REGION_INIFILE="${OPENSIM_DIR}/etc/sims-available/${SIM}.ini"

Expand Down Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions share/system/opensim.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ISTHMUS_PORT=""
ISTHMUS_PIDFILE=""
ISTHMUS_LOGFILE=""
REGION_LOAD_DIR=""
SIM=""

[Startup]
regionload_regionsdir="${Environment|REGION_LOAD_DIR}"
Expand Down Expand Up @@ -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"

0 comments on commit 6b3704d

Please sign in to comment.