#!/bin/bash -e # postinst USERNAME="Debian-ippl" # purge debconf database entries on upgrade from 1.4.14-4 and 1.4.14-5 [ -n "$IPPLDEBUG" ] && set -x if [ "$1" = "configure" ]; then if dpkg --compare-versions "$2" le-nl "1.4.14-4" || \ dpkg --compare-versions "$2" le-nl "1.4.14-5"; then if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge db_stop fi fi fi # Add user if [ "$1" = "configure" ]; then echo >&2 'Adding system user' adduser --system --group --home /var/run/ippl \ --disabled-login --force-badname $USERNAME fi # Automatically added by dh_installinit if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then if [ -x "/etc/init.d/ippl" ]; then update-rc.d ippl defaults >/dev/null invoke-rc.d ippl start || exit $? fi fi # End automatically added section # zap old run files. Starting with 1.4.14-6, we are in /var/run/ippl/ rm -f /var/run/ippl.conf /var/run/ippl.pid