File: postrm

package info (click to toggle)
tripwire 2.3.1.2.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,876 kB
  • ctags: 6,896
  • sloc: cpp: 57,709; sh: 1,295; perl: 1,238; yacc: 497; lex: 356; makefile: 269; ansic: 10
file content (47 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh -e

# Post-removal script for the Debian Tripwire distribution.

#DEBHELPER#


# Make sure we should be running...
case "$1" in
purge)
    host=$(uname -n)
    etc=/etc/tripwire
    var=/var/lib/tripwire
    report=$var/report
    /bin/rm -f $etc/tw.fifo \
	$etc/tw.config-1.2 \
	$etc/tw.cfg \
	$etc/tw.cfg.bak \
	$etc/tw.pol \
	$etc/tw.pol.bak \
	$etc/site.key \
	$etc/${host}-local.key \
	$report/${host}-*.twr \
	$var/${host}.twd*

    lib=/usr/lib/tripwire
    /bin/rm -rf $lib/tripwire-1.2 \
	$lib/ztripwire-1.2 \
	/usr/share/man/man8/tripwire-1.2.8.gz \
	$lib/databases

    if [ -d $etc ]; then
	/bin/rmdir --ignore-fail-on-non-empty $etc
    fi
    if [ -d $lib ]; then
	/bin/rmdir --ignore-fail-on-non-empty $lib
    fi
    if [ -d $report ]; then
	/bin/rmdir --ignore-fail-on-non-empty $report
    fi
    if [ -d $var ]; then
	/bin/rmdir --ignore-fail-on-non-empty $var
    fi
    ;;

esac