File: postinst

package info (click to toggle)
midentd 2.1-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 112 kB
  • ctags: 13
  • sloc: perl: 261; sh: 57; makefile: 40
file content (31 lines) | stat: -rw-r--r-- 841 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
#!/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
	dpkg-statoverride --add identd nogroup 755 /var/run/identd

	# 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