diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 27831ecd..ed002826 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -93,19 +93,22 @@ function create_pleroma_blocklist { echo 'while read blocked; do' >> $blocking_script_file echo ' if [[ "$blocked" == *"."* || "$blocked" == *"@"* ]]; then' >> $blocking_script_file echo ' if [ ${#blocked} -gt 4 ]; then' >> $blocking_script_file - echo ' if [ $objects_updated ]; then' >> $blocking_script_file - echo ' objects_query="${objects_query} or"' >> $blocking_script_file - echo ' users_query="${users_query} or"' >> $blocking_script_file - echo ' fi' >> $blocking_script_file - echo " objects_query=\"\${objects_query} data->>'content' ilike '%\${blocked}%' or data->>'actor' ilike '%\${blocked}%' or data->>'to' ilike '%\${blocked}%' or data->>'id' ilike '%\${blocked}%' or data->>'external_url' ilike '%\${blocked}%'\"" >> $blocking_script_file - echo " users_query=\"\${users_query} nickname ilike '%\${blocked}%'\"" >> $blocking_script_file - echo ' objects_updated=1' >> $blocking_script_file + echo ' if [ $objects_updated ]; then' >> $blocking_script_file + echo ' objects_query="${objects_query} or"' >> $blocking_script_file + echo ' users_query="${users_query} or"' >> $blocking_script_file + echo ' fi' >> $blocking_script_file + echo " objects_query=\"\${objects_query} data->>'content' ilike '%\${blocked}%' or data->>'actor' ilike '%\${blocked}%' or data->>'to' ilike '%\${blocked}%' or data->>'id' ilike '%\${blocked}%' or data->>'external_url' ilike '%\${blocked}%'\"" >> $blocking_script_file + echo " users_query=\"\${users_query} nickname ilike '%\${blocked}%'\"" >> $blocking_script_file + echo ' objects_updated=1' >> $blocking_script_file echo ' if [[ "$blocked" != *"@"* ]]; then' >> $blocking_script_file - echo ' if [ $websub_server_subscriptions_updated ]; then' >> $blocking_script_file - echo ' websub_server_subscriptions_query="${websub_server_subscriptions_query} or"' >> $blocking_script_file - echo ' fi' >> $blocking_script_file - echo " websub_server_subscriptions_query=\"\${websub_server_subscriptions_query} callback like '%\${blocked}%'\"" >> $blocking_script_file - echo ' websub_server_subscriptions_updated=1' >> $blocking_script_file + echo ' if ! grep -q "$blocked" /etc/hosts; then' >> $blocking_script_file + echo ' echo "127.0.0.1 $blocked" >> /etc/hosts' >> $blocking_script_file + echo ' fi' >> $blocking_script_file + echo ' if [ $websub_server_subscriptions_updated ]; then' >> $blocking_script_file + echo ' websub_server_subscriptions_query="${websub_server_subscriptions_query} or"' >> $blocking_script_file + echo ' fi' >> $blocking_script_file + echo " websub_server_subscriptions_query=\"\${websub_server_subscriptions_query} callback like '%\${blocked}%'\"" >> $blocking_script_file + echo ' websub_server_subscriptions_updated=1' >> $blocking_script_file echo ' fi' >> $blocking_script_file echo ' fi' >> $blocking_script_file echo ' fi' >> $blocking_script_file diff --git a/src/freedombone-utils-i2p b/src/freedombone-utils-i2p index 36f3cc61..d25d6a74 100755 --- a/src/freedombone-utils-i2p +++ b/src/freedombone-utils-i2p @@ -63,6 +63,7 @@ function install_i2p { } function remove_i2p { + service i2p stop apt-get -yq remove i2p-router --purge apt-get -yq remove i2p --purge apt-get -yq remove i2p-keyring --purge @@ -89,6 +90,8 @@ function remove_i2p { function i2p_enable_sam { if [ ! -f /var/lib/i2p/i2p-config/clients.config ]; then + service i2p stop + apt-get -yq remove i2p --purge apt-get -yq remove i2p-router --purge if [ -d /var/lib/i2p ]; then