File: postinst

package info (click to toggle)
midentd 2.3.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 120 kB
  • ctags: 21
  • sloc: perl: 368; sh: 64; makefile: 41
file content (34 lines) | stat: -rw-r--r-- 922 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
#!/bin/sh
# post install script for the Debian GNU/Linux midentd package
# $Id: postinst,v 1.4 1999/09/17 01:08:39 herbert Exp $

set -e

#DEBHELPER#

case "$1" in
    abort-upgrade | abort-deconfigure | abort-remove)
        update-inetd --enable ident
        ;;
    configure)
	if ! id -u identd >/dev/null 2>&1; then
	    adduser --quiet --system --home /var/run/identd identd
	fi
	if ! dpkg-statoverride --list /var/run/identd >/dev/null
	then
	    dpkg-statoverride --update --add identd nogroup 755 /var/run/identd
	fi

	# Update inetd.conf (first remove any existing, then add the new)
	update-inetd --disable ident
	update-inetd --group INFO --add "ident		stream	tcp	nowait	identd	/usr/sbin/midentd midentd"

	# Touch the logfile
	touch /var/log/midentd/midentd.log
	chown -R identd:adm /var/log/midentd /var/run/identd
	;;
    *)
        printf "$0: incorrect arguments: $*\n" >&2
        exit 1
        ;;
esac