knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject git commit: KNOX-377 - detect stale pid and allow ldap server to restart in its presence
Date Thu, 15 May 2014 18:05:39 GMT
Repository: knox
Updated Branches:
  refs/heads/master 0d82b5727 -> f22064aa3


KNOX-377 - detect stale pid and allow ldap server to restart 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/f22064aa
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/f22064aa
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/f22064aa

Branch: refs/heads/master
Commit: f22064aa3783ef7ea85d755de1624131d355d7ce
Parents: 0d82b57
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Thu May 15 14:05:24 2014 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Thu May 15 14:05:24 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/knox/blob/f22064aa/gateway-release/home/bin/ldap.sh
----------------------------------------------------------------------
diff --git a/gateway-release/home/bin/ldap.sh b/gateway-release/home/bin/ldap.sh
index 2b12f27..27f0c1a 100755
--- a/gateway-release/home/bin/ldap.sh
+++ b/gateway-release/home/bin/ldap.sh
@@ -208,6 +208,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