Skip to content

Commit

Permalink
-Fixed errors when curl is not installed --> Added check for curl
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 4, 2023
1 parent 2b31458 commit 7bc30a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mcserver_installer.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2989,7 +2989,7 @@ distro_check () {
}

## Script Version
scriptversion="7.3"
scriptversion="7.4"
##

## Latest Version
Expand Down Expand Up @@ -3017,6 +3017,17 @@ function servers_folder {
fi
}

function curl_check {
apt-cache policy curl > curl.txt
if grep -q none curl.txt
then
apt install curl -y
rm curl.txt
else
rm curl.txt
fi
}


if [ "$EUID" -ne 0 ]
then echo "Please run as root"
Expand All @@ -3031,4 +3042,4 @@ else
choose_type
fi

## End of Startup function
## End of Startup function

0 comments on commit 7bc30a1

Please sign in to comment.