Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4 | daniel-mar | 1 | #!/bin/bash |
2 | |||
5 | daniel-mar | 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 | # |
||
4 | daniel-mar | 11 | |
5 | daniel-mar | 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 |
||
20 | |||
4 | daniel-mar | 21 | if [ -L /usr/bin/gwhois ]; then |
22 | rm /usr/bin/gwhois |
||
23 | echo "Symlink /usr/bin/gwhois removed" |
||
24 | fi |
||
25 | |||
5 | daniel-mar | 26 | # --- |
27 | |||
4 | daniel-mar | 28 | if [ -L /usr/sbin/gwhois-pattern-update ]; then |
29 | rm /usr/sbin/gwhois-pattern-update |
||
30 | echo "Symlink /usr/sbin/gwhois-pattern-update removed" |
||
31 | fi |
||
32 | |||
5 | daniel-mar | 33 | # --- |
34 | |||
4 | daniel-mar | 35 | if [ -L /usr/sbin/gwhois-qa-check ]; then |
36 | rm /usr/sbin/gwhois-qa-check |
||
37 | echo "Symlink /usr/sbin/gwhois-qa-check removed" |
||
38 | fi |
||
39 | |||
5 | daniel-mar | 40 | # --- |
41 | |||
4 | daniel-mar | 42 | if [ -L /usr/sbin/gwhois-update ]; then |
43 | rm /usr/sbin/gwhois-update |
||
44 | echo "Symlink /usr/sbin/gwhois-update removed" |
||
45 | fi |
||
46 | |||
5 | daniel-mar | 47 | # --- |
48 | |||
4 | daniel-mar | 49 | if [ -L /usr/share/man/man1/gwhois.1 ]; then |
50 | rm /usr/share/man/man1/gwhois.1 |
||
51 | echo "Symlink /usr/share/man/man1/gwhois.1 removed" |
||
52 | fi |