mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
18 lines
629 B
Bash
Executable file
18 lines
629 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Remove this warning by setting the host in /etc/hosts:
|
|
# sudo: unable to resolve host 8160b021d811: Temporary failure in name resolution
|
|
echo 127.0.0.1 $(hostname) >> /etc/hosts
|
|
|
|
# Do the conversion without root
|
|
# /usr/bin/sudo OCR=$OCR OCR_LANGUAGE=$OCR_LANGUAGE -u user /usr/local/bin/pixels-to-pdf-unpriv
|
|
OCR=$OCR OCR_LANGUAGE=$OCR_LANGUAGE /usr/bin/python3 /usr/local/bin/dangerzone.py pixels-to-pdf
|
|
RETURN_CODE=$?
|
|
if [ $RETURN_CODE -ne 0 ]; then
|
|
echo ""
|
|
exit $RETURN_CODE
|
|
fi
|
|
|
|
# Move converted files into /safezone
|
|
/bin/mv /tmp/safe-output.pdf /safezone
|
|
/bin/mv /tmp/safe-output-compressed.pdf /safezone
|