From 438898ca2dd3a49961a224fdf0434008b08f57de Mon Sep 17 00:00:00 2001 From: soup-bowl Date: Sun, 29 Jan 2023 21:18:32 +0000 Subject: [PATCH] Region definable. --- opensim/Dockerfile | 2 +- opensim/defaults/StandaloneCommon.ini | 9 ++------- opensim/docker-entrypoint.sh | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/opensim/Dockerfile b/opensim/Dockerfile index 0f8715a..1df5582 100644 --- a/opensim/Dockerfile +++ b/opensim/Dockerfile @@ -5,7 +5,7 @@ LABEL org.opencontainers.image.authors="code@soupbowl.io" LABEL org.opencontainers.image.source="https://github.com/soup-bowl/opensimulator-docker" LABEL org.opencontainers.image.licenses="MIT" -RUN apt-get update && apt-get install -y screen +RUN apt-get update && apt-get install -y screen uuid-runtime RUN mkdir /opt/opensim-tmp \ && curl http://opensimulator.org/dist/opensim-0.9.2.1.tar.gz | tar xzf - -C /opt/opensim-tmp \ diff --git a/opensim/defaults/StandaloneCommon.ini b/opensim/defaults/StandaloneCommon.ini index 8210467..b9e9fc5 100644 --- a/opensim/defaults/StandaloneCommon.ini +++ b/opensim/defaults/StandaloneCommon.ini @@ -11,16 +11,11 @@ DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml" -[GridService] - StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" - Region_Foobar = "DefaultRegion, FallbackRegion" - ExportSupported = true - [LibraryModule] LibraryName = "Library" [LoginService] - WelcomeMessage = "Running OpenSimulator in Standalone Grid mode." + WelcomeMessage = "OpenSimulator is running!" SRV_HomeURI = "${Hypergrid|HomeURI}" SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}" SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}" @@ -31,7 +26,7 @@ [GridInfoService] login = ${Const|BaseURL}:${Const|PublicPort}/ - gridname = "OpenSimulator Sandbox Standalone" + gridname = "OpenSimulator Instance" gridnick = "osss" welcome = ${Const|BaseURL}:8080 diff --git a/opensim/docker-entrypoint.sh b/opensim/docker-entrypoint.sh index c7285ea..84b4e43 100755 --- a/opensim/docker-entrypoint.sh +++ b/opensim/docker-entrypoint.sh @@ -19,8 +19,6 @@ if [ ! -e OpenSim.ini ]; then StorageProvider = \"OpenSim.Data.MySQL.dll\" ConectionString = \"Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;\"" >> OpenSim.ini fi - cat OpenSim.ini - exit 330 fi if [ ! -e config-include/StandaloneCommon.ini ]; then @@ -34,12 +32,25 @@ if [ ! -e config-include/StandaloneCommon.ini ]; then else echo " Include-Storage = \"config-include/storage/SQLiteStandalone.ini\"" >> config-include/StandaloneCommon.ini fi + + echo "[GridService] + StorageProvider = \"OpenSim.Data.Null.dll:NullRegionData\" + Region_${REGION_NAME:-Region} = \"DefaultRegion, FallbackRegion\" + ExportSupported = true" >> config-include/StandaloneCommon.ini + + if [ -n "${GRID_WELCOME}" ]; then + sed -i -e "s/OpenSimulator is running!/${GRID_WELCOME}/g" config-include/StandaloneCommon.ini + fi + + if [ -n "${GRID_NAME}" ]; then + sed -i -e "s/OpenSimulator Instance/${GRID_NAME}/g" config-include/StandaloneCommon.ini + fi fi if [ `find Regions -maxdepth 1 -name '*.ini' | wc -l` -eq 0 ]; then echo >&2 "INFO: No region details found, pulling one together." - echo "[Foobar] + echo "[${REGION_NAME:-Region}] RegionUUID = $(uuidgen) Location = 1000,1000 InternalAddress = 0.0.0.0