@ echo off



rem $Id: ShutDown.bat,v 1.8.2.1 2001/09/03 14:28:06 jaiganesh Exp $

rem This file can be used to ShutDown the server from remote machine also.

rem Just copy the ShutDown.class ,BASE64Encoder.class and this file to remote 

rem machine. Edit this file to set the java_home  and classpath variable



cd ..

call .\setEnv.bat



set HOSTNAME=localhost

set WEBSERVER_PORT=9090

set RMI_PORT=1099

set TCP_PORT=2000



set CLASSPATH=%NMS_CLASSES%;%NMS_CLASSES%\ApiUtils.jar     


if "test"=="%1test" goto default



if "test1"=="%2test1" goto usage



set USER_NAME=%1

set USER_PASSWD=%2





rem Usage : java com.adventnet.nms.util.StandAloneShutDown [-h host] [-wp webServerPort] [-rp rmiRegPort] [-tp tcpPort] [-u username] [-p password]



%JAVA_HOME%\bin\java com.adventnet.nms.util.StandAloneShutDown -h %HOSTNAME% -wp %WEBSERVER_PORT% -rp %RMI_PORT% -tp %TCP_PORT% -u %USER_NAME% -p %USER_PASSWD%

cd bin



goto end



:default

set USER_NAME=root



%JAVA_HOME%\bin\java com.adventnet.launcher.nms.ShutdownServer -HOST_NAME %HOSTNAME% -WEB_SERVER_PORT %WEBSERVER_PORT% -RMI_PORT %RMI_PORT% -TCP_PORT %TCP_PORT% -USER_NAME %USER_NAME% -NMS_RESOURCE_DIRECTORY %NMS_HOME%\html -RESOURCE_PROPERTIES ShutDownNmsServerResources -RESOURCE_LOCALE en_US
 

cd bin



goto end



:usage

echo Invalid Usage

echo "Usage : ShutDown <username> <password>"

cd bin



goto end

:end

