From f7ccbfe2f3c4f335393401cac6eb1dcdf9f14c4c Mon Sep 17 00:00:00 2001 From: Ben Peddell Date: Sun, 5 Jul 2015 22:01:01 +1000 Subject: [PATCH] Discover path of lsof --- tools/arkmanager | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/arkmanager b/tools/arkmanager index 04d4e50..0129bc3 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -25,6 +25,11 @@ if [ -f "${HOME}/.arkmanager.cfg" ]; then source "${HOME}/.arkmanager.cfg" fi +lsof=lsof +if [ -x /usr/sbin/lsof ]; then + lsof=/usr/sbin/lsof +fi + # Local variables info="" thejob="" @@ -142,7 +147,7 @@ function isTheServerRunning(){ # # function isTheServerUp(){ - lsof -i :"$ark_Port" > /dev/null + $lsof -i :"$ark_Port" > /dev/null result=$? # In this case, the result is: # 1 if the command fail. The port is not listenning