From fbaa712e0e190a4289a08ba483ba1d368cdfd662 Mon Sep 17 00:00:00 2001 From: soup-bowl Date: Sun, 29 Jan 2023 20:53:54 +0000 Subject: [PATCH] Estate & region management added. --- opensim/defaults/OpenSim.ini | 16 ---------------- opensim/defaults/Regions.ini | 10 ---------- opensim/docker-entrypoint.sh | 25 +++++++++++++++++++++++-- 3 files changed, 23 insertions(+), 28 deletions(-) delete mode 100644 opensim/defaults/Regions.ini diff --git a/opensim/defaults/OpenSim.ini b/opensim/defaults/OpenSim.ini index 33251a7..06e02e1 100644 --- a/opensim/defaults/OpenSim.ini +++ b/opensim/defaults/OpenSim.ini @@ -11,13 +11,6 @@ implicit_gods = false allow_grid_gods = true -[Estates] - DefaultEstateName = OpenSim Standalone - DefaultEstateOwnerName = Governor Linden - DefaultEstateOwnerUUID = 00000000-0000-0000-0000-000000000000 - DefaultEstateOwnerEMail = foobar@example.com - DefaultEstateOwnerPassword = password - [Network] http_listener_port = 9000 ExternalHostNameForLSL = ${Const|BaseHostname} @@ -29,18 +22,9 @@ Cap_AvatarPickerSearch = "localhost" Cap_GetDisplayNames = "localhost" -[Messaging] - StorageProvider = OpenSim.Data.MySQL.dll - ConectionString = "Data Source=db;Database=metaverse;User ID=root;Password=password;Old Guids=true;" - [BulletSim] AvatarToAvatarCollisionsByDefault = true -[RemoteAdmin] - enabled = true - access_password = "password" - enabled_methods = all - [XEngine] AppDomainLoading = false DeleteScriptsOnStartup = false diff --git a/opensim/defaults/Regions.ini b/opensim/defaults/Regions.ini deleted file mode 100644 index a8d3d35..0000000 --- a/opensim/defaults/Regions.ini +++ /dev/null @@ -1,10 +0,0 @@ -; If you change the Region name, update [GridService] in StandaloneCommon.ini, otherwise -; avatars that haven't connected before will throw an error. - -[Foobar] - RegionUUID = 92f0c4a2-e7b4-11ea-adc1-0242ac120002 - Location = 1000,1000 - InternalAddress = 0.0.0.0 - InternalPort = 9000 - AllowAlternatePorts = False - ExternalHostName = localhost diff --git a/opensim/docker-entrypoint.sh b/opensim/docker-entrypoint.sh index 020925f..c7285ea 100755 --- a/opensim/docker-entrypoint.sh +++ b/opensim/docker-entrypoint.sh @@ -6,6 +6,21 @@ chown -R $(id -u):$(id -g) defaults if [ ! -e OpenSim.ini ]; then echo >&2 "INFO: No OpenSim configuration found, pulling one together." cp defaults/OpenSim.ini OpenSim.ini + + echo -e "\n[Estates] + DefaultEstateName = ${ESTATE_NAME:-Default Estate} + DefaultEstateOwnerName = ${ESTATE_OWNER_NAME:-Foo Bar} + DefaultEstateOwnerUUID = ${ESTATE_OWNER_UUID:-00000000-0000-0000-0000-000000000000} + DefaultEstateOwnerEMail = ${ESTATE_OWNER_EMAIL:-user@example.com} + DefaultEstateOwnerPassword = ${ESTATE_OWNER_PASSWORD:-password}" >> OpenSim.ini + + if [[ "${DATABASE_ENGINE}" == "mysql" ]]; then + echo -e "\n[Messaging] + 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 @@ -19,12 +34,18 @@ if [ ! -e config-include/StandaloneCommon.ini ]; then else echo " Include-Storage = \"config-include/storage/SQLiteStandalone.ini\"" >> config-include/StandaloneCommon.ini fi - cat config-include/StandaloneCommon.ini fi if [ `find Regions -maxdepth 1 -name '*.ini' | wc -l` -eq 0 ]; then echo >&2 "INFO: No region details found, pulling one together." - cp defaults/Regions.ini Regions/Regions.ini + + echo "[Foobar] + RegionUUID = $(uuidgen) + Location = 1000,1000 + InternalAddress = 0.0.0.0 + InternalPort = 9000 + AllowAlternatePorts = False + ExternalHostName = localhost" >> Regions/Regions.ini fi exec "$@"