From 57fe9caad2ee2ed11bac40bd025defa78f89342d Mon Sep 17 00:00:00 2001
From: brinn <brinn>
Date: Sat, 1 Sep 2012 12:18:48 +0000
Subject: [PATCH] Ensure we do not start up the openBIS AS when an instance is
 already running.

SVN: 26501
---
 openbis/dist/server/startup.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/openbis/dist/server/startup.sh b/openbis/dist/server/startup.sh
index f8fe1a30fa0..dbe42357ac7 100755
--- a/openbis/dist/server/startup.sh
+++ b/openbis/dist/server/startup.sh
@@ -7,6 +7,12 @@ source `dirname "$0"`/setup-env
 
 checkNotRoot
 
+source `dirname "$0"`/status.sh > /dev/null
+if [ $? -eq 0 ]; then
+  echo openBIS AS already running, shut it down before start a new one.
+  exit 1
+fi
+
 $JVM -DSTOP.PORT=$JETTY_STOP_PORT \
      -DSTOP.KEY=$JETTY_STOP_KEY \
      $JAVA_OPTS $JAVA_MEM_OPTS \
-- 
GitLab