File: preinst

package info (click to toggle)
dictd 1.4.8-8
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,492 kB
  • ctags: 2,540
  • sloc: ansic: 20,420; sh: 1,721; makefile: 745; perl: 235; yacc: 189; lex: 117
file content (22 lines) | stat: -rw-r--r-- 423 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
#! /bin/bash
set -e

case "$1" in
    upgrade|install)
     /etc/init.d/dictd stop||true
     kill `ps ax|grep "^.\{20\}dictd"|cut -c -5` &> /dev/null||true
     kill `cat /var/run/dictd.pid` &> /dev/null||true
     rm -f /var/run/dictd.pid &> /dev/null||true

     exit 0
    ;;

    abort-upgrade)
        exit 0;
    ;;

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