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

post_upgrade() {
	/bin/true
}

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

op=$1
shift

$op "$@"

