Complete conversion to Image/config organization.

Have working standalone and standalone-sql configurations for standard opensim image.
This commit is contained in:
Robert Adams
2022-02-01 21:33:38 +00:00
parent 9df47af11d
commit a5d8db63d3
22 changed files with 232 additions and 424 deletions
@@ -10,24 +10,26 @@ CONFIG_NAME=${CONFIG_NAME:-standalone}
CONFIGDIR=${OPENSIMBIN}/config/${CONFIG_NAME}
cd "$CONFIGDIR"
source ../setEnvironment.sh
source ../scripts/setEnvironment.sh
# Update EXTERNAL_HOSTNAME
cd "$OPENSIMBIN"
for file in $OPENSIMBIN/Regions/*.ini $CONFIGDIR/Regions/*.ini ; do
if [[ -e "$file" ]] ; then
echo "opensim-docker: updateConfigFiles.sh: fixing ExternalHostname in \"$file\""
sed --in-place -e "s/^ExternalHostName = .*$/ExternalHostName = \"${EXTERNAL_HOSTNAME}\"/" "$file"
fi
done
# Add EXTERNAL_HOSTNAME to the common configuation in OpenSim.ini
sed --in-place -e "s/^ *BaseHostname = .*$/ BaseHostname = ${EXTERNAL_HOSTNAME}/" "$OPENSIMBIN/OpenSim.ini"
echo "opensim-docker: updateConfigFiles.sh: fixing BaseHostname in OpenSim.ini"
grep " BaseHostname =" "$OPENSIMBIN/OpenSim.ini"
# If the environment variables haven't been copied into misc.ini, do it now
echo "opensim-docker: updateConfigFiles.sh: replacing vars in \"${CONFIGDIR}/misc.ini\""
# If the replacement has already happened, this is a NOOP
if [[ -e "${CONFIGDIR}/misc.ini.prototype" ]] ; then
cp "${CONFIGDIR}/misc.ini.prototype" "${CONFIGDIR}/misc.ini"
fi
sed --in-place \
-e "s/MYSQL_DB_USER/$MYSQL_DB_USER/" \
-e "s/MYSQL_DB_SOURCE/$MYSQL_DB_SOURCE/" \