post_install() {
	# lpr
	/opt/brother/Printers/dcpj785dw/inf/setupPrintcapij dcpj785dw -i
	
	# cupswrapper
	/opt/brother/Printers/dcpj785dw/cupswrapper/cupswrapperdcpj785dw
	
	systemctl restart org.cups.cupsd
}

post_upgrade() {
	/bin/true
}

pre_remove() {
	# lpr
	/opt/brother/Printers/dcpj785dw/inf/setupPrintcapij dcpj785dw -e
	
	# cupswrapper
	/opt/brother/Printers/dcpj785dw/cupswrapper/cupswrapperdcpj785dw -e
}

op=$1
shift

$op "$@"

