Add blocked domains to /etc/hosts
This commit is contained in:
parent
578af997ca
commit
a0a3d9f9a5
|
@ -101,6 +101,9 @@ function create_pleroma_blocklist {
|
|||
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 ! 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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue