From a56b6a121b31b82dcf7279e6eea60bbca1852fc5 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 31 May 2022 14:34:49 +0200 Subject: Sync --- .scripts/adblock | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .scripts/adblock (limited to '.scripts/adblock') diff --git a/.scripts/adblock b/.scripts/adblock new file mode 100755 index 0000000..e02cf92 --- /dev/null +++ b/.scripts/adblock @@ -0,0 +1,10 @@ +#!/bin/bash + +if grep -Fxq "##START" /etc/hosts +then + sudo sed -i "/##START/,/##END/s/#\(.\)/\1/" /etc/hosts + echo Enabled adblock! +else + sudo sed -i "/#START/,/#END/s/./#&/" /etc/hosts + echo Disabled adblock! +fi -- cgit v1.2.3