File: postinst

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 (38 lines) | stat: -rw-r--r-- 1,019 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
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
set -e

case "$1" in
    configure)
        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
    cat<<EOF

     The dictd server will not run properly unless the lines in 
     /etc/dictd.conf for each dictionary installed have been
     uncommented (delete the # in front of the line).
     
     Changes to the dictd.conf file do not take effect until the server
     has been restarted by re-booting, or by "/etc/init.d/dictd restart"
     as root.

     Press [RET] to continue

EOF
     read dummy_flag
     update-rc.d dictd defaults >/dev/null
#    sleep 1 
# Possibly some of the restart problems have been due to a race condition here
     /etc/init.d/dictd start
     exit 0
    ;;

    abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
        exit 0;
    ;;

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