@echo off

rem ##############################################################################
rem #
rem # Copyright (c) 2013 VMware, Inc. All rights reserved.
rem # -- VMware Confidential
rem #
rem ##############################################################################

if "%JAVA_HOME%" == "" (
   call "%~dp0common" Error: JAVA_HOME environment variable is not set.
   exit /B 1
)

set SSO_SSL_TOOL_DIR=%~dp0
set SSO_SSL_TOOL_JAR=%SSO_SSL_TOOL_DIR%\sso-updater.jar
set SSO_SSL_TOOL_LOG=%LOGS_FOLDER%\sso-update-ssl.log
if [%~1] == [-rollback] (
   set SSO_SSL_TOOL_LOG=%LOGS_FOLDER%\rollback-sso.log
)

"%JAVA_HOME%\bin\java" -Dsso-updater.tool.log-file="%SSO_SSL_TOOL_LOG%" -jar "%SSO_SSL_TOOL_JAR%" %*
if [%~1] == [-rollback] if [%ERRORLEVEL%] == [0] (
	call "%~dp0common" To complete the task, you must run the following steps in the given order:
	call "%~dp0common" 1. Restart the Inventory Service
	call "%~dp0common" 2. Restart the Web Client
)
exit /B %ERRORLEVEL%
