Discover path of lsof

This commit is contained in:
Ben Peddell 2015-07-05 22:01:01 +10:00
parent 9313d72a09
commit f7ccbfe2f3

View File

@ -25,6 +25,11 @@ if [ -f "${HOME}/.arkmanager.cfg" ]; then
source "${HOME}/.arkmanager.cfg" source "${HOME}/.arkmanager.cfg"
fi fi
lsof=lsof
if [ -x /usr/sbin/lsof ]; then
lsof=/usr/sbin/lsof
fi
# Local variables # Local variables
info="" info=""
thejob="" thejob=""
@ -142,7 +147,7 @@ function isTheServerRunning(){
# #
# #
function isTheServerUp(){ function isTheServerUp(){
lsof -i :"$ark_Port" > /dev/null $lsof -i :"$ark_Port" > /dev/null
result=$? result=$?
# In this case, the result is: # In this case, the result is:
# 1 if the command fail. The port is not listenning # 1 if the command fail. The port is not listenning