File: mpd.prerm

package info (click to toggle)
mpd 0.12.1-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,940 kB
  • ctags: 2,321
  • sloc: ansic: 23,137; sh: 9,071; makefile: 155
file content (28 lines) | stat: -rw-r--r-- 508 bytes parent folder | download
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
#!/bin/sh -e

do_mpd_stop () {
    if [ -x /etc/init.d/mpd ]; then
        if [ -x /usr/sbin/invoke-rc.d ]; then
            invoke-rc.d mpd stop
        else
            /etc/init.d/mpd stop
        fi
    fi
}

case "$1" in
    remove|deconfigure)
        do_mpd_stop
        ;;
    upgrade)
        if dpkg --compare-versions "$2" lt-nl 0.12.0; then
            do_mpd_stop
        fi
        ;;
    *)  
        echo "prerm called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

#DEBHELPER#