postinst is in dancer-ircd 1.0.36-8ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
| 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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #! /bin/sh
# postinst script for dancer-ircd
set -e
USER=dancer
case "$1" in
    configure)
        if ! grep -q "^dancer:" /etc/passwd; then
	    echo Creating a user \'$USER\'...
	    adduser --quiet --system --home /var/run/dancer-ircd \
		--disabled-password --no-create-home --group \
		$USER
	fi
	touch /var/lib/dancer-ircd/dline.conf
	touch /var/lib/dancer-ircd/kline.conf
        # Changing the user is not supported; this is an upstream
        # limitation. Someday it will be fixed
	chown $USER:$USER /var/log/dancer-ircd
	chown $USER:$USER /var/run/dancer-ircd
	chown $USER:$USER /var/lib/dancer-ircd
	chown $USER:$USER /var/lib/dancer-ircd/dline.conf
	chown $USER:$USER /var/lib/dancer-ircd/kline.conf
	chmod 0640 /var/lib/dancer-ircd/dline.conf /var/lib/dancer-ircd/kline.conf
	chgrp $USER /etc/dancer-ircd/ircd.conf
	chgrp $USER /etc/dancer-ircd/olines
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/dancer-ircd" ]; then
	update-rc.d dancer-ircd defaults >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d dancer-ircd start || exit $?
	else
		/etc/init.d/dancer-ircd start || exit $?
	fi
fi
# End automatically added section
exit 0
 |