The most important entries to remove in the shared xwall.ini are
SMTPNATWanIPAddress=
SMTPMainMachineName=
MV=
Now you can start MBAdmin at the shared location without the new installation wizard starting.
On the farmed XWall machines, you create a file c:\xwall\local.ini containing the above system dependent entries only.
Then, you implement a batch file which collects the xwall.INI from the shared INI location and combines it with your "local.ini". The resulting file is then copied into your productive C:\XWALL directory where it is automatically recognized and reloaded.
The ini collection/combining/replacing batch can be called regularly on every farmed XWall server using task scheduler and proper credentials to access the shared ini location. Make sure to stagger the starting time across your XWall farm to avoid all of them restarting at the same time. The advantage of this procedure is that the active xwall.ini file on every server is complete and can be edited using the local mbadmin.exe for testing or debugging.
Here is a working batch for the purpose:
Listing of XWGETINI.CMD
- Code: Select all
@echo off
rem Get shared XWall ini
rem To be called by task scheduler on every farmed XWall server
rem *** Change the variables below to your environment!
set XWSHARED=C:\temp\xwall\shared\xwall.ini
set XWLOCDIR=C:\XWALL
rem Change to working directory
pushd %TEMP%
rem Cleanup temporary files
if exist local.ini del local.ini
if exist shared.ini del shared.ini
if exist xwall.tmp del xwall.tmp
rem Verify existing xwall.ini
if not exist "%XWLOCDIR%\xwall.ini" goto ERRINI
rem Copy shared INI file from shared INI location
copy "%XWSHARED%" shared.ini /Y > NUL
if not exist shared.ini goto ERRSHA
rem Make sure ini files ends with CR/LF
echo.>>shared.ini
rem Copy local INI file from local XWALL installation path
copy "%XWLOCDIR%\local.ini" local.ini /Y > NUL
if not exist local.ini goto ERRLOC
rem Make sure ini files ends with CR/LF
echo.>>local.ini
rem Initialize an new empty temporary file
echo.>xwall.tmp
rem Combine local.ini and shared.ini into xwall.ini
copy /b xwall.tmp + local.ini + shared.ini > NUL
rem Check new config for most important entry
find /i "MV=" xwall.tmp > NUL
if errorlevel 1 goto ERRTGT
rem Compare existing configuration with new one
fc /b xwall.tmp "%XWLOCDIR%\xwall.ini" > NUL
if not errorlevel 1 goto SKIP
rem Configuration has changed, copy new config file
copy xwall.tmp "%XWLOCDIR%\xwall.tmp" > NUL
rem Verify copy of new config file
if not exist "%XWLOCDIR%\xwall.tmp" goto ERRCPY
rem Remove old backup INI
if exist "%XWLOCDIR%\xwall.old" del "%XWLOCDIR%\xwall.old"
rem Rename old INI for backup
ren "%XWLOCDIR%\xwall.ini" xwall.old
rem Activate new INI using rename (faster!)
ren "%XWLOCDIR%\xwall.tmp" xwall.ini
echo Configuration updated
rem Check if replacement was successful
if exist "%XWLOCDIR%\xwall.ini" goto END
rem Go back to old configuration if replacement failed
echo Reverting to old configuration
ren "%XWLOCDIR%\xwall.old" xwall.ini
goto END
:ERRINI
echo Error "%XWLOCDIR%\xwall.ini" not found
goto END
:ERRSHA
echo Error copying "%XWSHARED%"
goto END
:ERRLOC
echo Error copying local.ini from "%XWLOCDIR%"
goto END
:ERRTGT
echo Error file contains no license
goto END
:ERRTGT
echo Error copying "%XWLOCDIR%\xwall.tmp"
goto END
:SKIP
echo Configuration is the same, skipping update.
:END
set XWSHARED=
set XWLOCDIR=
popd
