Subversion Repositories vgwhois

Rev

Rev 4 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 5
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
-
 
3
#
-
 
4
#  VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
-
 
5
#  Installer / Uninstaller
-
 
6
#
-
 
7
#  (c) 2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
-
 
8
#
-
 
9
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
-
 
10
#
-
 
11
 
3
# TODO: check if we may do this (root)
12
# --- STEP 0: Are we root?
-
 
13
 
-
 
14
if [[ $EUID > 0 ]]; then
-
 
15
        >&2 echo "You need to be root to execute this program."
-
 
16
        exit 1
-
 
17
fi
-
 
18
 
-
 
19
# --- STEP 1: Remove the "installed" symlinks
4
 
20
 
5
if [ -L /usr/bin/gwhois ]; then
21
if [ -L /usr/bin/gwhois ]; then
6
        rm /usr/bin/gwhois
22
        rm /usr/bin/gwhois
7
        echo "Symlink /usr/bin/gwhois removed"
23
        echo "Symlink /usr/bin/gwhois removed"
8
fi
24
fi
9
 
25
 
-
 
26
# ---
-
 
27
 
10
if [ -L /usr/sbin/gwhois-pattern-update ]; then
28
if [ -L /usr/sbin/gwhois-pattern-update ]; then
11
        rm /usr/sbin/gwhois-pattern-update
29
        rm /usr/sbin/gwhois-pattern-update
12
        echo "Symlink /usr/sbin/gwhois-pattern-update removed"
30
        echo "Symlink /usr/sbin/gwhois-pattern-update removed"
13
fi
31
fi
14
 
32
 
-
 
33
# ---
-
 
34
 
15
if [ -L /usr/sbin/gwhois-qa-check ]; then
35
if [ -L /usr/sbin/gwhois-qa-check ]; then
16
        rm /usr/sbin/gwhois-qa-check
36
        rm /usr/sbin/gwhois-qa-check
17
        echo "Symlink /usr/sbin/gwhois-qa-check removed"
37
        echo "Symlink /usr/sbin/gwhois-qa-check removed"
18
fi
38
fi
19
 
39
 
-
 
40
# ---
-
 
41
 
20
if [ -L /usr/sbin/gwhois-update ]; then
42
if [ -L /usr/sbin/gwhois-update ]; then
21
        rm /usr/sbin/gwhois-update
43
        rm /usr/sbin/gwhois-update
22
        echo "Symlink /usr/sbin/gwhois-update removed"
44
        echo "Symlink /usr/sbin/gwhois-update removed"
23
fi
45
fi
24
 
46
 
-
 
47
# ---
-
 
48
 
25
if [ -L /usr/share/man/man1/gwhois.1 ]; then
49
if [ -L /usr/share/man/man1/gwhois.1 ]; then
26
        rm /usr/share/man/man1/gwhois.1
50
        rm /usr/share/man/man1/gwhois.1
27
        echo "Symlink /usr/share/man/man1/gwhois.1 removed"
51
        echo "Symlink /usr/share/man/man1/gwhois.1 removed"
28
fi
52
fi