Skip to content

Commit 98f2bd9

Browse files
authored
Update ImageMagick policy modification for multiple versions
1 parent ca2c708 commit 98f2bd9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

install/paperless-ngx-install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ $STD uv run python -m nltk.downloader -d /usr/share/nltk_data snowball_data
110110
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data stopwords
111111
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data punkt_tab || \
112112
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data punkt
113-
sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
113+
for policy_file in /etc/ImageMagick-6/policy.xml /etc/ImageMagick-7/policy.xml; do
114+
if [[ -f "$policy_file" ]]; then
115+
sed -i -e 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' "$policy_file"
116+
fi
117+
done
114118
msg_ok "Installed Natural Language Toolkit"
115119

116120
msg_info "Creating Services"

0 commit comments

Comments
 (0)