File: postrm

package info (click to toggle)
tripwire 2.4.3.7-6
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,220 kB
  • sloc: cpp: 57,898; sh: 6,006; perl: 2,735; yacc: 497; makefile: 439; lex: 356; ansic: 10
file content (49 lines) | stat: -rw-r--r-- 886 bytes parent folder | download | duplicates (7)
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
48
49
#!/bin/sh

set -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
    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
    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
	rmdir --ignore-fail-on-non-empty $etc
    fi
    if [ -d $lib ]; then
	rmdir --ignore-fail-on-non-empty $lib
    fi
    if [ -d $report ]; then
	rmdir --ignore-fail-on-non-empty $report
    fi
    if [ -d $var ]; then
	rmdir --ignore-fail-on-non-empty $var
    fi
    ;;

esac