Subversion Repositories vgwhois

Rev

Rev 5 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 daniel-mar 1
#!/bin/bash
2
 
3
DIR=$( dirname "$0" )
4
REAL_DIR=$( cd "$DIR" && pwd )
5
 
6
# --- STEP 1: Install required packages
7
 
8
# Required for the program itself:
9
#  - perl (used by gwhois main program. used by 6to4 and Teredo subprogram) 
10
#  - libwww-perl (cpan LWP::Simple; used by gwhois main program) 
11
#  - libnet-libidn-perl (cpan Net::LibIDN; used by gwhois main program) 
12
#  - (commented out) libencode-detect-perl (cpan Encode::Detect; used by gwhois main program)
13
#  - curl (used by some parts of the gwhois main program. used by pattern generator and subprograms) 
14
#  - lynx-cur (used by some parts of the gwhois main program) 
15
#  - libnet-ip-perl (cpan Net::IP; used for IPv6 interpretation by Teredo subprogram and gwhois main program) 
16
#  - libnet-dns-perl (cpan Net::DNS; used by Teredo subprogram) 
17
#  - libmath-bigint-gmp-perl (cpan Math::BigInt; used for IPv6 masking by gwhois main program) 
18
#  - php7.0-cli (used by subprograms and pattern-generator) 
19
#
20
# Required for the maintenance tools
21
#  - php7.0-gmp (used by IPv6 pattern generator) 
22
#  - netcat (used by the whois-ping maintainance program)
23
#  - php7.0-sqlite3 (used by the whois-ping maintainance program)
24
#
25
# TODO: how can be avoid the "php7.0" name? are there generic package names?
26
 
27
aptitude update
28
aptitude install perl libwww-perl libnet-libidn-perl curl lynx-cur libnet-ip-perl libnet-dns-perl libmath-bigint-gmp-perl php7.0-cli php7.0-gmp netcat php7.0-sqlite3
29
 
30
# --- STEP 2: "Install" symlinks
31
 
32
if [ -L /usr/bin/gwhois ]; then
33
        rm /usr/bin/gwhois
34
fi
35
# TODO: check if we may do this (root)
36
ln -s "$REAL_DIR"/main/gwhois /usr/bin/gwhois
37
echo "Symlink /usr/bin/gwhois created"
38
 
39
if [ -L /usr/sbin/gwhois-pattern-update ]; then
40
        rm /usr/sbin/gwhois-pattern-update
41
fi
42
# TODO: check if we may do this (root)
43
ln -s "$REAL_DIR"/maintenance/pattern-generator/gwhois-pattern-update /usr/sbin/gwhois-pattern-update
44
echo "Symlink /usr/sbin/gwhois-pattern-update created"
45
 
46
if [ -L /usr/sbin/gwhois-qa-check ]; then
47
        rm /usr/sbin/gwhois-qa-check
48
fi
49
# TODO: check if we may do this (root)
50
ln -s "$REAL_DIR"/maintenance/qa-monitor/run /usr/sbin/gwhois-qa-check
51
echo "Symlink /usr/sbin/gwhois-qa-check created"
52
 
53
if [ -L /usr/sbin/gwhois-update ]; then
54
        rm /usr/sbin/gwhois-update
55
fi
56
# TODO: check if we may do this (root)
57
ln -s "$REAL_DIR"/update.sh /usr/sbin/gwhois-update
58
echo "Symlink /usr/sbin/gwhois-update created"
59
 
60
if [ -L /usr/share/man/man1/gwhois.1 ]; then
61
        rm /usr/share/man/man1/gwhois.1
62
fi
63
# TODO: check if we may do this (root)
64
ln -s "$REAL_DIR"/man/man1/gwhois.1 /usr/share/man/man1/gwhois.1
65
echo "Symlink /usr/share/man/man1/gwhois.1 created"
66