Below is the file 'debian/dropbear.prerm' from this revision. You can also download the file.
#!/bin/sh
set -e
test "$1" = 'remove' || test "$1" = 'deconfigure' || exit 0
if test -x /etc/init.d/cokedropbear; then
if test -x /usr/sbin/invoke-rc.d; then
invoke-rc.d cokedropbear stop
else
/etc/init.d/cokedropbear stop
fi
fi