summarylogtreecommitdiffstats
path: root/brother-dcpj4120dw.install
blob: b2a3e1b7d6dfae1a4fe05043bc27751223ed6035 (plain)
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
post_install() {
	# lpr
	sed -i 's/chown lp/chown root/g' /opt/brother/Printers/dcpj4120dw/inf/setupPrintcapij
	/opt/brother/Printers/dcpj4120dw/inf/setupPrintcapij dcpj4120dw -i
	
	# cupswrapper
	/opt/brother/Printers/dcpj4120dw/cupswrapper/cupswrapperdcpj4120dw
	
	systemctl restart org.cups.cupsd.service
}

post_upgrade() {
	/bin/true
}

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

op=$1
shift

$op "$@"