diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index b091950f..4414f1e2 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -421,8 +421,8 @@ function gnusocial_block_user_script { echo ' for f in $files_to_delete' >> /usr/bin/gnusocial-delete-user echo ' do' >> /usr/bin/gnusocial-delete-user echo ' if [ $filectr -gt 0 ]; then' >> /usr/bin/gnusocial-delete-user - echo ' if [ -f /var/www/${domain_name}/htdocs/file/${f} ]; then' >> /usr/bin/gnusocial-delete-user - echo ' rm /var/www/${domain_name}/htdocs/file/${f}' >> /usr/bin/gnusocial-delete-user + echo ' if $(ls /var/www/${domain_name}/htdocs/file/*${f}* 1> /dev/null 2>&1); then' >> /usr/bin/gnusocial-delete-user + echo ' rm /var/www/${domain_name}/htdocs/file/*${f}*' >> /usr/bin/gnusocial-delete-user echo ' fi' >> /usr/bin/gnusocial-delete-user echo ' fi' >> /usr/bin/gnusocial-delete-user echo ' filectr=$((filectr + 1))' >> /usr/bin/gnusocial-delete-user @@ -504,8 +504,8 @@ function gnusocial_block_domain_script { echo ' for f in $files_to_delete' >> /usr/bin/gnusocial-delete-domain echo ' do' >> /usr/bin/gnusocial-delete-domain echo ' if [ $filectr -gt 0 ]; then' >> /usr/bin/gnusocial-delete-domain - echo ' if [ -f /var/www/${domain_name}/htdocs/file/${f} ]; then' >> /usr/bin/gnusocial-delete-domain - echo ' rm /var/www/${domain_name}/htdocs/file/${f}' >> /usr/bin/gnusocial-delete-domain + echo ' if $(ls /var/www/${domain_name}/htdocs/file/*${f}* 1> /dev/null 2>&1); then' >> /usr/bin/gnusocial-delete-domain + echo ' rm /var/www/${domain_name}/htdocs/file/*${f}*' >> /usr/bin/gnusocial-delete-domain echo ' fi' >> /usr/bin/gnusocial-delete-domain echo ' fi' >> /usr/bin/gnusocial-delete-domain echo ' filectr=$((filectr + 1))' >> /usr/bin/gnusocial-delete-domain