mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-12 02:48:27 +00:00
Check if lsof exists before using it
This commit is contained in:
parent
653f9a5cd0
commit
772398ffc0
@ -641,8 +641,11 @@ function isTheServerRunning(){
|
||||
#
|
||||
#
|
||||
function isTheServerUp(){
|
||||
$lsof -i "${ark_MultiHome:+udp@}${ark_MultiHome}:$(getGamePort)" > /dev/null
|
||||
result=$?
|
||||
result=1
|
||||
if [ ! -x "$lsof" ]; then
|
||||
"$lsof" -i "${ark_MultiHome:+udp@}${ark_MultiHome}:$(getGamePort)" > /dev/null
|
||||
result=$?
|
||||
fi
|
||||
if [ $result -ne 0 ]; then
|
||||
perl -MSocket -MFcntl -e '
|
||||
my $port = int($ARGV[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user