comparison misc/uninstalldcc.in @ 0:c7f6b056b673

First import of vendor version
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 13:49:58 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c7f6b056b673
1 #! /bin/sh
2
3 # Delete most DCC files.
4 # Some logs configuration files with locally chosen parameters in @prefix@
5 # are not deleted.
6 # Manual changes such as links to @libexecdir@/rcDCC or the
7 # installation of the cron job, @libexecdir@/cron-dccd, are not reversed.
8
9
10 # Copyright (c) 2008 by Rhyolite Software, LLC
11 #
12 # This agreement is not applicable to any entity which sells anti-spam
13 # solutions to others or provides an anti-spam solution as part of a
14 # security solution sold to other entities, or to a private network
15 # which employs the DCC or uses data provided by operation of the DCC
16 # but does not provide corresponding data to other users.
17 #
18 # Permission to use, copy, modify, and distribute this software without
19 # changes for any purpose with or without fee is hereby granted, provided
20 # that the above copyright notice and this permission notice appear in all
21 # copies and any distributed versions or copies are either unchanged
22 # or not called anything similar to "DCC" or "Distributed Checksum
23 # Clearinghouse".
24 #
25 # Parties not eligible to receive a license under this agreement can
26 # obtain a commercial license to use DCC by contacting Rhyolite Software
27 # at sales@rhyolite.com.
28 #
29 # A commercial license would be for Distributed Checksum and Reputation
30 # Clearinghouse software. That software includes additional features. This
31 # free license for Distributed ChecksumClearinghouse Software does not in any
32 # way grant permision to use Distributed Checksum and Reputation Clearinghouse
33 # software
34 #
35 # THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE, LLC DISCLAIMS ALL
36 # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
37 # OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE, LLC
38 # BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
39 # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
40 # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
41 # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
42 # SOFTWARE.
43
44 # Rhyolite Software DCC 1.3.103-1.3 $Revision$
45 # @configure_input@
46
47 DCC_HOMEDIR=@prefix@
48 DCC_LIBEXEC=@libexecdir@ # in case dcc_conf has disappeared
49 . $DCC_HOMEDIR/dcc_conf
50 BDIR=$DCC_HOMEDIR/build
51 DCCBDIR=$BDIR/dcc
52
53 USAGE=`basename $0`': [-x]'
54 while getopts "x" c; do
55 case $c in
56 x) set -x; DEBUG=-x;;
57 *) echo "$USAGE" 1>&2; exit 1;;
58 esac
59 done
60 shift `expr $OPTIND - 1 || true`
61 if test "$#" -ne 0; then
62 echo "$USAGE" 1>&2; exit 1
63 fi
64
65
66 echo "This script will delete most of a DCC client and server installed"
67 echo "with the official DCC Makefiles in $DCCBDIR."
68 echo "Are you sure you want to proceed? " | tr -d '\012'
69 read OK
70 case $OK in
71 [yY][eE][sS]) ;;
72 *) echo "ok, nothing deleted"; exit;;
73 esac
74
75 if test ! -f $DCCBDIR/Makefile; then
76 $DCC_LIBEXEC/updatedcc -U
77 if test ! -f $DCCBDIR/Makefile; then
78 echo "This script can only be run after $DCC_LIBEXEC/updatedcc has"
79 echo "installed the offical Makefiles in $DCCBDIR"
80 exit 1
81 fi
82 fi
83
84 $DCC_LIBEXEC/rcDCC $DEBUG stop
85 cd $DCCBDIR
86 @DCCMAKE@ uninstall purge
87 rm -f $BDIR/dcc.tar.Z \
88 $DCC_HOMEDIR/flod.map $DCC_HOMEDIR/grey_flod.map \
89 $DCC_HOMEDIR/dcc_db $DCC_HOMEDIR/dcc_db.hash $DCC_HOMEDIR/dcc_db-old \
90 $DCC_HOMEDIR/grey_db $DCC_HOMEDIR/grey_db.hash $DCC_HOMEDIR/grey_db-old \
91 $DCC_HOMEDIR/testmsg-whitelist $DCC_HOMEDIR/testmsg-whitelist.log \
92 $DCC_HOMEDIR/*.dccw $DCC_HOMEDIR/*.dccx
93 for DIR in `find $DCC_HOMEDIR -depth -type d` $DCC_LIBEXEC $DCC_RUNDIR; do
94 if test -d $DIR; then
95 find $DIR -depth -type d | @DCC_XARGS@ rmdir
96 fi
97 done
98
99 echo
100 echo "Some of your configuration and log files remain in $DCC_HOMEDIR"
101