@echo off
REM sets the semiphore files for auto restart feature
REM parameters 1: ??      - topology
REM            2: A or M  - Analyzer or Moniter
REM            3: START   - starting up    
REM               END     - ended normally

if "%3" == "START" goto start
if "%3" == "END" goto end

:start
if exist c:\tools\topo.??  del c:\tools\topo.??   >NUL
if exist c:\tools\appl.?   del c:\tools\appl.?    >NUL
if exist c:\tools\fail.yes del c:\tools\fail.yes  >NUL
echo Topology is set to %1 >c:\tools\topo.%1     
echo Application is set to %2 >c:\tools\appl.%2   
echo Application started up >c:\tools\fail.yes 
goto exit

:end
if exist c:\tools\topo.??  del c:\tools\topo.??   >NUL
if exist c:\tools\appl.?   del c:\tools\appl.?    >NUL
if exist c:\tools\fail.yes del c:\tools\fail.yes  >NUL
goto exit

:exit

