From d982eaf35580903a907d39c0eef9d3872d3fc477 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Tue, 14 Jul 2020 09:57:44 +0800 Subject: [PATCH] feat: It is feasible to not install or update geoip.dat and geosite.dat issue #20 --- install-release.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install-release.sh b/install-release.sh index 6c70fd7..72988b5 100644 --- a/install-release.sh +++ b/install-release.sh @@ -335,8 +335,11 @@ install_v2ray() { install_file v2ray install_file v2ctl install -d /usr/local/lib/v2ray/ - install_file geoip.dat - install_file geosite.dat + # If the file exists, geoip.dat and geosite.dat will not be installed or updated + if [[ ! -f "/usr/local/lib/v2ray/.undat" ]]; then + install_file geoip.dat + install_file geosite.dat + fi # Install V2Ray configuration file to /usr/local/etc/v2ray/ if [[ ! -d '/usr/local/etc/v2ray/' ]]; then @@ -518,8 +521,11 @@ main() { install_startup_service_file echo 'installed: /usr/local/bin/v2ray' echo 'installed: /usr/local/bin/v2ctl' - echo 'installed: /usr/local/lib/v2ray/geoip.dat' - echo 'installed: /usr/local/lib/v2ray/geosite.dat' + # If the file exists, the content output of installing or updating geoip.dat and geosite.dat will not be displayed + if [[ ! -f "/usr/local/lib/v2ray/.undat" ]]; then + echo 'installed: /usr/local/lib/v2ray/geoip.dat' + echo 'installed: /usr/local/lib/v2ray/geosite.dat' + fi if [[ "$CONFDIR" -eq '1' ]]; then echo 'installed: /usr/local/etc/v2ray/00_log.json' echo 'installed: /usr/local/etc/v2ray/01_api.json'