prerm is in ubuntu-fan 0.9.0.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33  | #!/bin/sh
fanatic_deconfigure()
{
	fanctl config list | \
	while read underlay overlay x
	do
		config_mine=$( fanctl config show -u "$underlay" -o "$overlay" | grep "comment='fanatic configured'" | wc -l )
		if [ "$config_mine" != 0 ]; then
			fanatic disable-lxd -u "$underlay" -o "$overlay"
			fanatic disable-docker --no-docker-restart -u "$underlay" -o "$overlay"
			fanatic disable-fan -u "$underlay" -o "$overlay"
		fi
	done
}
case "$1" in
remove)
	# Deconfigure any fanatic built docker/LXD configuration.
	fanatic_deconfigure
	# Take down any fan mappings currently present.
	fanctl down -e || exit 1
	;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ubuntu-fan" ] || [ -e "/etc/init/ubuntu-fan.conf" ]; then
	invoke-rc.d ubuntu-fan stop || exit $?
fi
# End automatically added section
 |