#!/bin/sh -e

. /usr/share/debconf/confmodule

#DEBHELPER#

db_stop

# Manualy added by mantas, was Automatically added by dh_installzopeinstance
PKG=plone-site
INSTANCE=plone-site
ZVER=2.9

add_products()
{
    products="Intranet"
    if [ -n "$products" ]; then
        dzhandle -z $ZVER add-product --lazy $INSTANCE $products
    fi
}

add_products
if ! dzhandle -z $ZVER zopectl $INSTANCE restart; then
    echo "Could not start zope instance $INSTANCE. Please check"
    echo "for errors running the instance by hand:"
    echo "  /var/lib/zope$ZVER/instance/$INSTANCE/runzope"
fi
