knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject git commit: KNOX-366 - detect stale pid file a allow server start in its presence.
Date Wed, 14 May 2014 19:52:50 GMT
Repository: knox
Updated Branches:
  refs/heads/master 1ffd116ae -> 2b325edb0


KNOX-366 - detect stale pid file a allow server start in its presence.

Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/2b325edb
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/2b325edb
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/2b325edb

Branch: refs/heads/master
Commit: 2b325edb0e8b49b0b522eab129dc3786f3b5735a
Parents: 1ffd116
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Wed May 14 15:52:36 2014 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Wed May 14 15:52:36 2014 -0400

----------------------------------------------------------------------
 gateway-release/home/bin/gateway.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/2b325edb/gateway-release/home/bin/gateway.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/gateway.sh b/gateway-release/home/bin/gateway.sh
index 95f76ad..173fcf4 100755
--- a/gateway-release/home/bin/gateway.sh
+++ b/gateway-release/home/bin/gateway.sh
@@ -220,6 +220,14 @@ function getPID {
    fi
    
    APP_PID="$(<$APP_PID_FILE)"
+
+   if ps -p $APP_PID > /dev/null
+   then
+     echo "$PID is running"
+   else
+     return 1
+   fi
+
    return 0
 }
 


Mime
View raw message