Skip to content

Commit

Permalink
Merge pull request #186 from sixg0000d/patch-1
Browse files Browse the repository at this point in the history
Rename a var and enable set it by env
  • Loading branch information
IceCodeNew authored Nov 26, 2020
2 parents 07a829a + 7f59b07 commit bd3e146
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions install-dat-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

# 0 0 * * * /usr/local/bin/install-dat-release > /dev/null 2>&1

# You can modify it to /usr/local/lib/v2ray
V2RAY="/usr/local/share/v2ray"
# You can set this variable whatever you want in shell session right before running this script by issuing:
# export DAT_PATH='/usr/local/lib/v2ray'
DAT_PATH=${DAT_PATH:-/usr/local/share/v2ray}

DOWNLOAD_LINK_GEOIP="https://github.com/v2fly/geoip/releases/latest/download/geoip.dat"
DOWNLOAD_LINK_GEOSITE="https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat"
file_ip='geoip.dat'
Expand Down Expand Up @@ -64,8 +66,8 @@ check_sum() {
}

install_file() {
install -m 644 "${dir_tmp}"/${file_dlc} "${V2RAY}"/${file_site}
install -m 644 "${dir_tmp}"/${file_ip} "${V2RAY}"/${file_ip}
install -m 644 "${dir_tmp}"/${file_dlc} "${DAT_PATH}"/${file_site}
install -m 644 "${dir_tmp}"/${file_ip} "${DAT_PATH}"/${file_ip}
rm -r "${dir_tmp}"
}

Expand Down

0 comments on commit bd3e146

Please sign in to comment.