Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#https://github.com/acmesh-official/get.acme.sh

if ! curl -I --connect-timeout 1 -m 3 -s https://t.co > /dev/null ;then
GHPROXY=https://ghproxy.com/
fi

_exists() {
cmd="$1"
if [ -z "$cmd" ] ; then
Expand Down Expand Up @@ -29,10 +33,13 @@
_email="--$(echo "$_email" | tr '=' ' ')"
fi

PROJECT=${ACME_GIT-"acmesh-official/acme.sh"}
URL=${GHPROXY}https://raw.githubusercontent.com/$PROJECT/$BRANCH/acme.sh

if _exists curl && [ "${ACME_USE_WGET:-0}" = "0" ]; then
curl https://raw.githubusercontent.com/acmesh-official/acme.sh/$BRANCH/acme.sh | sh -s -- --install-online $_email "$@"
curl $URL | sh -s -- --install-online $_email "$@"
elif _exists wget ; then
wget -O - https://raw.githubusercontent.com/acmesh-official/acme.sh/$BRANCH/acme.sh | sh -s -- --install-online $_email "$@"
wget -O - $URL | sh -s -- --install-online $_email "$@"
else
echo "Sorry, you must have curl or wget installed first."
echo "Please install either of them and try again."
Expand Down