File: dlt-daemon.postrm

package info (click to toggle)
dlt-daemon 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,296 kB
  • sloc: ansic: 58,041; cpp: 16,199; sh: 1,769; xml: 1,440; python: 376; makefile: 31
file content (46 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
# postrm script for dlt

set -e

# Source the debconf shell library.
. /usr/share/debconf/confmodule

[ -z "$DLT_USER" ] && DLT_USER=_dlt
[ -z "$DLT_GROUP" ] && DLT_GROUP=_dlt

case "$1" in
    purge)

    if getent passwd $DLT_USER >/dev/null; then
        if [ -x "`which deluser 2>/dev/null`" ]; then
            deluser --system $DLT_USER
        else
            echo >&2 "Not removing \`_dlt' system account" \
              "because deluser command was not found."
        fi
    fi
    if getent group $DLT_GROUP >/dev/null; then
        if [ -x "`which delgroup 2>/dev/null`" ]; then
            delgroup --system $DLT_GROUP
        else
            echo >&2 "Not removing \`_dlt' system group" \
              "because delgroup command was not found."
        fi
    fi
    ;;

    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;

esac


#DEBHELPER#

exit 0