diff --git a/Dockerfile b/Dockerfile index 84d95a2..6d30185 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ apt-get -y --no-install-recommends install \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/* && \ wget https://download.brother.com/welcome/dlf105200/brscan4-0.4.11-1.amd64.deb --progress=dot:giga -O /tmp/brscan4.deb && \ -wget https://download.brother.com/welcome/dlf006652/brscan-skey-0.3.2-0.amd64.deb --progress=dot:giga -O /tmp/brscan-skey.deb && \ +wget https://download.brother.com/welcome/dlf006652/brscan-skey-0.3.5-0.amd64.deb --progress=dot:giga -O /tmp/brscan-skey.deb && \ dpkg -i --force-all /tmp/brscan4.deb && \ dpkg -i --force-all /tmp/brscan-skey.deb && \ rm -f /tmp/brscan4.deb /tmp/brscan-skey.deb diff --git a/script/scanRear.sh b/script/scanRear.sh index 3fa0180..e1eb031 100755 --- a/script/scanRear.sh +++ b/script/scanRear.sh @@ -30,8 +30,13 @@ output_pdf_file="/scans/${date}.pdf" cd "$tmp_dir" -kill -9 "$(cat scan_pid)" -rm scan_pid +if [ -f scan_pid ]; then + pid=$(cat scan_pid) + if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then + kill -9 "$pid" + fi + rm -f scan_pid +fi function scan_cmd() { # `brother4:net1;dev0` device name gets passed to scanimage, which it refuses as an invalid device name for some reason.