#! /bin/sh
#

set -e

HOMEDIR=/run/kamailio

case "$1" in
    configure)
        adduser --quiet --system --group --disabled-password \
                --shell /bin/false --gecos "Kamailio" \
                --home "$HOMEDIR" kamailio || true

        # Remove obsolete rc.d links.
        update-rc.d kamailio-lb remove
        update-rc.d kamailio-proxy remove
        ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        ;;

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

#DEBHELPER#
