post_install() { __port2="$(lpinfo -v | grep -i 'usb://Brother/PJ-723' | head -1)" if [ "$__port2" = '' ];then echo "You can now register your new printer using the web interface at:" echo " http://localhost:631/" exit 0 fi __port="$(echo $__port2| sed s/direct//g)" if [ "$__port" = '' ];then echo "You can now register your new printer using the web interface at:" echo " http://localhost:631/" exit 0 fi lpadmin -p Brother_PJ-723 -E -v $__port -P /usr/share/ppd/Brother/brother_pj723_printer_en.ppd } pre_remove() { lpadmin -x Brother_PJ-723 }