From 9760e6fe1b175d814793cee4c2913b73a6d0e2bf Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Fri, 25 Sep 2020 16:08:05 +0800 Subject: [PATCH] create function `curl`, instead of alias `curl` --- install-dat-release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install-dat-release.sh b/install-dat-release.sh index 35955f7..10a51a9 100644 --- a/install-dat-release.sh +++ b/install-dat-release.sh @@ -13,8 +13,6 @@ # 0 0 * * * /usr/local/bin/install-dat-release > /dev/null 2>&1 -alias curl='"curl" --retry 5 --retry-delay 10 --retry-max-time 60 --false-start --http2 --tlsv1.2 -L' - # You can modify it to /usr/local/lib/v2ray V2RAY="/usr/local/share/v2ray" DOWNLOAD_LINK_GEOIP="https://github.com/v2fly/geoip/releases/latest/download/geoip.dat" @@ -24,6 +22,10 @@ file_dlc='dlc.dat' file_site='geosite.dat' dir_tmp="$(mktemp -d)" +curl() { + $(type -P curl) -L -q --retry 5 --retry-delay 10 --retry-max-time 60 "$@" +} + check_if_running_as_root() { # If you want to run as another user, please modify $UID to be owned by this user if [[ "$UID" -ne '0' ]]; then