Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | #!/bin/bash |
2 | |||
3 | # |
||
5 | daniel-mar | 4 | # VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois) |
5 | # Maintenance / Developer utilities |
||
2 | daniel-mar | 6 | # |
5 | daniel-mar | 7 | # (c) 2012-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de> |
2 | daniel-mar | 8 | # |
5 | daniel-mar | 9 | # License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2) |
2 | daniel-mar | 10 | # |
11 | |||
4 | daniel-mar | 12 | DIR=$( dirname $(realpath "$0" ) ) |
2 | daniel-mar | 13 | |
14 | . "$DIR"/../config/gwhois-pattern-update.conf |
||
15 | . "$DIR"/../config/urls.conf |
||
16 | |||
17 | echo "=================== GWHOIS PATTERN UPDATE ===================" |
||
18 | echo "This script downloads the latest RIR statistics" |
||
19 | echo "and renews the pattern files of GWhoIs to provide" |
||
20 | echo "up-to-date informations of IPv4, IPv6 and ASN resources." |
||
21 | echo "ATTENTION: The parsing of the downloaded files will take" |
||
22 | echo "approximately 15-20 minutes!!!" |
||
23 | echo "=============================================================" |
||
24 | |||
25 | # RIR stats are necessary for generate_ipv4 and generate_ipv6 |
||
4 | daniel-mar | 26 | echo "RIR stats Synchronization ..." |
2 | daniel-mar | 27 | "$DIR"/sync_rir_stats |
28 | |||
4 | daniel-mar | 29 | echo "IPv4 Generation ..." |
2 | daniel-mar | 30 | if [ $? -eq 0 ]; then |
31 | echo "IPv4 Generating ..." |
||
32 | "$DIR"/generate_ipv4 |
||
33 | fi |
||
34 | |||
4 | daniel-mar | 35 | echo "IPv6 Generation ..." |
2 | daniel-mar | 36 | if [ $? -eq 0 ]; then |
37 | echo "IPv6 Generating ..." |
||
38 | "$DIR"/generate_ipv6 |
||
39 | fi |
||
40 | |||
4 | daniel-mar | 41 | echo "ASN Generation ..." |
2 | daniel-mar | 42 | if [ $? -eq 0 ]; then |
43 | echo "ASN Generating ..." |
||
44 | "$DIR"/generate_asn |
||
45 | fi |
||
46 | |||
4 | daniel-mar | 47 | echo "TLD Generation ..." |
2 | daniel-mar | 48 | if [ $? -eq 0 ]; then |
49 | echo "TLD Generating ..." |
||
50 | "$DIR"/generate_tld |
||
51 | |||
52 | echo "Domains Generating ..." |
||
53 | "$DIR"/generate_domains |
||
54 | fi |
||
55 | |||
56 | echo "Everything finished!" |