#!/bin/sh

LOCAL_CONFIG_FILES="apt_no_repo_accept apt_reject libs.local.yaml zombies_ignore"

set -e

case $1 in
	configure)
		# Move configuration files which are recognized, but
		# not shipped by default and hence are not conffiles.
		# See README.Debian.
		if [ -d /etc/hobbit/ ]; then
                    for f in $LOCAL_CONFIG_FILES; do
                        if [ -e /etc/hobbit/$f -a ! -e /etc/xymon/$f ]; then
                            mv -v /etc/hobbit/$f /etc/xymon/$f
                        fi
                    done
                fi

		if test -x /usr/lib/xymon/server/bin/xymond ; then
			invoke-rc.d xymon reload || :
		else
			invoke-rc.d xymon-client reload || :
		fi
		;;
esac

#DEBHELPER#

exit 0
