mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 15:08:28 +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(){
|
function isTheServerUp(){
|
||||||
$lsof -i "${ark_MultiHome:+udp@}${ark_MultiHome}:$(getGamePort)" > /dev/null
|
result=1
|
||||||
result=$?
|
if [ ! -x "$lsof" ]; then
|
||||||
|
"$lsof" -i "${ark_MultiHome:+udp@}${ark_MultiHome}:$(getGamePort)" > /dev/null
|
||||||
|
result=$?
|
||||||
|
fi
|
||||||
if [ $result -ne 0 ]; then
|
if [ $result -ne 0 ]; then
|
||||||
perl -MSocket -MFcntl -e '
|
perl -MSocket -MFcntl -e '
|
||||||
my $port = int($ARGV[0]);
|
my $port = int($ARGV[0]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user