Correct PDF restrictions for imagemagick

This commit is contained in:
fred 2021-09-21 02:42:55 +02:00
parent a3dfbe8bf5
commit 9734de08b5
2 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,10 @@ if [[ -f /etc/sudoers.d/apt ]]; then
sudo apt install -y $i
fi
done
if [[ $(cat /etc/ImageMagick-6/policy.xml | grep PDF) ]]; then
cat /etc/ImageMagick-6/policy.xml | grep -Ev PDF > /tmp/policy.xml
sudo cp /tmp/policy.xml /etc/ImageMagick-6/policy.xml
fi
else
echo "No sudo access for apt install... Please correct situation"
echo "PUT : $USER ALL=(ALL) NOPASSWD:/usr/bin/apt INTO /etc/sudoers.d/apt (use sudo visudo)"

View File

@ -27,6 +27,12 @@ for i in build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils v4l-utils vl
fi
done
## Correct PDF restrictions for imagemagick
if [[ $(cat /etc/ImageMagick-6/policy.xml | grep PDF) ]]; then
cat /etc/ImageMagick-6/policy.xml | grep -Ev PDF > /tmp/policy.xml
sudo cp /tmp/policy.xml /etc/ImageMagick-6/policy.xml
fi
[[ ! $(which kodi) && "$USER" != "xbian" ]] && sudo apt-get install kodi -y
sudo apt-get install python3-opencv -y ## INSTALLATION IA par reconnaissance d'images
[[ "$USER" != "xbian" ]] && sudo apt-get install x11-utils xclip zenity handbrake* -y