anchor.diff:  @echo off
   
   setlocal
  +rem Change the following if it has been changed to use another port
  +set PORT_TO_CHECK=9090
  +
  +set check_port=true
  +set TITLE="MagnetMessaging"
  +set PROG=mmx-server
  +set OPENFIRE_HOME=%CD%\..
  +
   
   if "%selfWrapped%"=="" (
     SET selfWrapped=true
  
positive.code: 
  
  
  :start
  	if exist %PROG%.pid (
  		echo Error! %PROG% is already running or you have a stale pid file. If %PROG% is not running delete %PROG%.pid file and restart"
  		exit /b 1
  	)	
  	call :check_java_home
  	start %TITLE% "%JAVA_HOME%\bin\java" -server -jar ..\lib\startup.jar
  	FOR /F "usebackq tokens=2" %%i IN (`tasklist /nh /fi "WINDOWTITLE eq %TITLE%"`) DO echo %%i > .\%PROG%.pid
  goto :end
  
  
  
  :stop
  	del .\%PROG%.pid
  	taskkill /f /fi "WINDOWTITLE eq %TITLE%" /t
  goto :end
  
  
  
negative.code:   GOTO :EOF
  )
  
  if "-p"=="%1" (
  	set check_port=false
  	shift
  )	
  
  if "start"=="%1" (
  	call :start
  