Subversion Repositories vgwhois

Rev

Rev 4 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

#!/bin/bash

#
#  VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
#  Maintenance / Developer utilities
#
#  (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
#
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
#

DIR=$( dirname $(realpath "$0" ) )

. "$DIR"/../config/gwhois-pattern-update.conf
. "$DIR"/../config/urls.conf

echo "=================== GWHOIS PATTERN UPDATE ==================="
echo "This script downloads the latest RIR statistics"
echo "and renews the pattern files of GWhoIs to provide"
echo "up-to-date informations of IPv4, IPv6 and ASN resources."
echo "ATTENTION: The parsing of the downloaded files will take"
echo "approximately 15-20 minutes!!!"
echo "============================================================="

# RIR stats are necessary for generate_ipv4 and generate_ipv6
echo "RIR stats Synchronization ..."
"$DIR"/sync_rir_stats

echo "IPv4 Generation ..."
if [ $? -eq 0 ]; then
        echo "IPv4 Generating ..."
        "$DIR"/generate_ipv4
fi

echo "IPv6 Generation ..."
if [ $? -eq 0 ]; then
        echo "IPv6 Generating ..."
        "$DIR"/generate_ipv6
fi

echo "ASN Generation ..."
if [ $? -eq 0 ]; then
        echo "ASN Generating ..."
        "$DIR"/generate_asn
fi

echo "TLD Generation ..."
if [ $? -eq 0 ]; then
        echo "TLD Generating ..."
        "$DIR"/generate_tld

        echo "Domains Generating ..."
        "$DIR"/generate_domains
fi

echo "Everything finished!"