diff --git a/script/scanRear.sh b/script/scanRear.sh index d9388fa..eb3e40f 100755 --- a/script/scanRear.sh +++ b/script/scanRear.sh @@ -84,6 +84,12 @@ fi gm convert ${gm_opts[@]} ./*.pnm "$tmp_output_pdf_file" ${script_dir}/trigger_inotify.sh "${SSH_USER}" "${SSH_PASSWORD}" "${SSH_HOST}" "${SSH_PATH}" "${output_pdf_file}" ${script_dir}/trigger_telegram.sh "${date}.pdf (rear) scanned" + ${script_dir}/sendtoftps.sh \ + "${FTP_USER}" \ + "${FTP_PASSWORD}" \ + "${FTP_HOST}" \ + "${FTP_PATH}" \ + "${output_pdf_file}" $remove_blank "$tmp_output_pdf_file" mv "$tmp_output_pdf_file" "$output_pdf_file" @@ -107,7 +113,7 @@ fi "${FTP_PASSWORD}" \ "${FTP_HOST}" \ "${FTP_PATH}" \ - "${output_pdf_file}" + "/scans/${date}-ocr.pdf" ) & fi ) & diff --git a/script/scantofile-0.2.4-1.sh b/script/scantofile-0.2.4-1.sh index 247287d..3a4cdf8 100755 --- a/script/scantofile-0.2.4-1.sh +++ b/script/scantofile-0.2.4-1.sh @@ -64,7 +64,13 @@ gm convert ${gm_opts[@]} "$filename_base"*.pnm "$output_pdf_file" ${script_dir}/trigger_inotify.sh "${SSH_USER}" "${SSH_PASSWORD}" "${SSH_HOST}" "${SSH_PATH}" "${output_pdf_file}" ${script_dir}/trigger_telegram.sh "${date}.pdf (front) scanned" - + ${script_dir}/sendtoftps.sh \ + "${FTP_USER}" \ + "${FTP_PASSWORD}" \ + "${FTP_HOST}" \ + "${FTP_PATH}" \ + "${output_pdf_file}" + echo "cleaning up for $date..." cd /scans || exit rm -rf "$tmp_dir" @@ -82,7 +88,7 @@ "${FTP_PASSWORD}" \ "${FTP_HOST}" \ "${FTP_PATH}" \ - "${output_pdf_file}" + "/scans/${date}-ocr.pdf" ) & fi ) &