summarylogtreecommitdiffstats
path: root/brother-pj723.install
blob: 91442f2dfc1ecb8d1d5457c73e9dcd77f6bfd011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
}