#! /bin/sh

set -e

if [ "$1" = "configure" ]
then
    if [ -f /etc/init.d/syslog-ng ]
    then
	set +e
	sh /etc/init.d/syslog-ng stop
	set -e
    fi

    update-rc.d syslog-ng defaults 10 90 >/dev/null

    #
    if [ -f /etc/init.d/syslog-ng ]
    then
	set +e
	sh /etc/init.d/syslog-ng start
	set -e
    fi
fi

exit 0
