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