#!/bin/bash

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/pure-lftpd-mysql" ]; then
		update-rc.d pure-lftpd-mysql defaults >/dev/null
		invoke-rc.d pure-lftpd-mysql start || exit 1
	fi
fi

# link configs from /etc/pure-ftpd
/usr/sbin/pure-lftpd-confgen
