#!/bin/sh
set -e

if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
	invoke-rc.d danted stop || exit $?
else
	/etc/init.d/danted stop || exit $?
fi

# restore the backup of squid configuration
mv -f /usr/share/doc/mix-danteconf/conf/danted.conf.orig /etc/danted.conf
rm /usr/share/doc/mix-danteconf/conf/danted.conf


