FELIX-1970: the stop script should always work even if the default user / password / host has been changed
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@900408 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/assembly/src/main/distribution/windows-text/bin/karaf.bat b/karaf/assembly/src/main/distribution/windows-text/bin/karaf.bat
index 5eb74ea..c8c3e7a 100755
--- a/karaf/assembly/src/main/distribution/windows-text/bin/karaf.bat
+++ b/karaf/assembly/src/main/distribution/windows-text/bin/karaf.bat
@@ -128,12 +128,19 @@
:RUN
SET OPTS=-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true
+ SET MAIN=org.apache.felix.karaf.main.Bootstrap
SET SHIFT=false
+ if "%1" == "stop" goto :EXECUTE_STOP
if "%1" == "console" goto :EXECUTE_CONSOLE
if "%1" == "server" goto :EXECUTE_SERVER
if "%1" == "client" goto :EXECUTE_CLIENT
goto :EXECUTE
+:EXECUTE_STOP
+ SET MAIN=org.apache.felix.karaf.main.Stop
+ SET SHIFT=true
+ goto :EXECUTE
+
:EXECUTE_CONSOLE
SET SHIFT=true
goto :EXECUTE