1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

check imagemagick before removing

This commit is contained in:
Krakinou 2021-02-20 21:01:30 +01:00
parent 16baeffe65
commit 864a514380

View file

@ -88,9 +88,11 @@ then
fi fi
#Restore Imagick policy #Restore Imagick policy
ynh_replace_string --match_string="<policy domain="coder" rights="read" pattern="PDF" />" \ if [ -z /etc/ImageMagick-6/policy.xml ]; then
--replace_string="<policy domain="coder" rights="none" pattern="PDF" />" \ ynh_replace_string --match_string="<policy domain="coder" rights="read" pattern="PDF" />" \
--target_file="/etc/ImageMagick-6/policy.xml" --replace_string="<policy domain="coder" rights="none" pattern="PDF" />" \
--target_file="/etc/ImageMagick-6/policy.xml"
fi
# Remove the log files # Remove the log files
ynh_script_progression --message="Removing log file..." --weight=1 ynh_script_progression --message="Removing log file..." --weight=1