#!/bin/sh
if [ -z "$D" -a -f "/etc/init.d/ciplushelper" ]; then
	/etc/init.d/ciplushelper stop
fi
if true && type update-rc.d >/dev/null 2>/dev/null; then
	if [ -n "$D" ]; then
		OPT="-f -r $D"
	else
		OPT="-f"
	fi
	update-rc.d $OPT ciplushelper remove
fi
if [ -z "$D" -a -f "/etc/init.d/cihelper.sh" ]; then
	/etc/init.d/cihelper.sh stop
fi
if true && type update-rc.d >/dev/null 2>/dev/null; then
	if [ -n "$D" ]; then
		OPT="-f -r $D"
	else
		OPT="-f"
	fi
	update-rc.d $OPT cihelper.sh remove
fi

if [ -e /usr/bin/ciplushelper ]; then
	rm /usr/bin/ciplushelper
fi
if [ -e /etc/init.d/ciplushelper ]; then
	rm /etc/init.d/ciplushelper
fi
if [ -e /etc/cihelper.conf ]; then
	rm /etc/cihelper.conf
fi

exit 0

