From 864a5143805880217e98d49f9406c96c2ba4a35c Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 20 Feb 2021 21:01:30 +0100 Subject: [PATCH] check imagemagick before removing --- scripts/remove | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index 388fde0..e03a266 100755 --- a/scripts/remove +++ b/scripts/remove @@ -88,9 +88,11 @@ then fi #Restore Imagick policy -ynh_replace_string --match_string="" \ - --replace_string="" \ - --target_file="/etc/ImageMagick-6/policy.xml" +if [ -z /etc/ImageMagick-6/policy.xml ]; then + ynh_replace_string --match_string="" \ + --replace_string="" \ + --target_file="/etc/ImageMagick-6/policy.xml" +fi # Remove the log files ynh_script_progression --message="Removing log file..." --weight=1