Rev 3 | 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 | # |
||
4 | # generic Whois - Automatic Pattern Generator Master-Script |
||
5 | # |
||
6 | # (c) 2012-2015 Daniel Marschall, ViaThinkSoft [www.viathinksoft.de] |
||
7 | # |
||
8 | # Distribution, usage etc. pp. regulated by the current version of GPL. |
||
9 | # |
||
10 | # |
||
11 | # Version 2015-04-15 |
||
12 | # |
||
13 | |||
4 | daniel-mar | 14 | DIR=$( dirname $(realpath "$0" ) ) |
2 | daniel-mar | 15 | |
16 | . "$DIR"/../config/gwhois-pattern-update.conf |
||
17 | . "$DIR"/../config/urls.conf |
||
18 | |||
19 | echo "=================== GWHOIS PATTERN UPDATE ===================" |
||
20 | echo "This script downloads the latest RIR statistics" |
||
21 | echo "and renews the pattern files of GWhoIs to provide" |
||
22 | echo "up-to-date informations of IPv4, IPv6 and ASN resources." |
||
23 | echo "ATTENTION: The parsing of the downloaded files will take" |
||
24 | echo "approximately 15-20 minutes!!!" |
||
25 | echo "=============================================================" |
||
26 | |||
27 | # RIR stats are necessary for generate_ipv4 and generate_ipv6 |
||
4 | daniel-mar | 28 | echo "RIR stats Synchronization ..." |
2 | daniel-mar | 29 | "$DIR"/sync_rir_stats |
30 | |||
4 | daniel-mar | 31 | echo "IPv4 Generation ..." |
2 | daniel-mar | 32 | if [ $? -eq 0 ]; then |
33 | echo "IPv4 Generating ..." |
||
34 | "$DIR"/generate_ipv4 |
||
35 | fi |
||
36 | |||
4 | daniel-mar | 37 | echo "IPv6 Generation ..." |
2 | daniel-mar | 38 | if [ $? -eq 0 ]; then |
39 | echo "IPv6 Generating ..." |
||
40 | "$DIR"/generate_ipv6 |
||
41 | fi |
||
42 | |||
4 | daniel-mar | 43 | echo "ASN Generation ..." |
2 | daniel-mar | 44 | if [ $? -eq 0 ]; then |
45 | echo "ASN Generating ..." |
||
46 | "$DIR"/generate_asn |
||
47 | fi |
||
48 | |||
4 | daniel-mar | 49 | echo "TLD Generation ..." |
2 | daniel-mar | 50 | if [ $? -eq 0 ]; then |
51 | echo "TLD Generating ..." |
||
52 | "$DIR"/generate_tld |
||
53 | |||
54 | echo "Domains Generating ..." |
||
55 | "$DIR"/generate_domains |
||
56 | fi |
||
57 | |||
58 | echo "Everything finished!" |