feat: It is feasible to not install or update geoip.dat and geosite.dat

issue #20
pull/25/head
Dct Mei 2020-07-14 09:57:44 +08:00
parent a2bd3852e4
commit d982eaf355
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
1 changed files with 10 additions and 4 deletions

View File

@ -335,8 +335,11 @@ install_v2ray() {
install_file v2ray install_file v2ray
install_file v2ctl install_file v2ctl
install -d /usr/local/lib/v2ray/ install -d /usr/local/lib/v2ray/
install_file geoip.dat # If the file exists, geoip.dat and geosite.dat will not be installed or updated
install_file geosite.dat 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/ # Install V2Ray configuration file to /usr/local/etc/v2ray/
if [[ ! -d '/usr/local/etc/v2ray/' ]]; then if [[ ! -d '/usr/local/etc/v2ray/' ]]; then
@ -518,8 +521,11 @@ main() {
install_startup_service_file install_startup_service_file
echo 'installed: /usr/local/bin/v2ray' echo 'installed: /usr/local/bin/v2ray'
echo 'installed: /usr/local/bin/v2ctl' echo 'installed: /usr/local/bin/v2ctl'
echo 'installed: /usr/local/lib/v2ray/geoip.dat' # If the file exists, the content output of installing or updating geoip.dat and geosite.dat will not be displayed
echo 'installed: /usr/local/lib/v2ray/geosite.dat' 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 if [[ "$CONFDIR" -eq '1' ]]; then
echo 'installed: /usr/local/etc/v2ray/00_log.json' echo 'installed: /usr/local/etc/v2ray/00_log.json'
echo 'installed: /usr/local/etc/v2ray/01_api.json' echo 'installed: /usr/local/etc/v2ray/01_api.json'