Uphosts migrated to being run in Docker
This commit is contained in:
parent
23c12ae08d
commit
593edcf9c0
@ -1,20 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PACKAGE=hosts
|
docker run --pull always --rm -it \
|
||||||
SOURCE_DIR="${HOME}/.config"
|
-v /etc/hosts:/etc/hosts \
|
||||||
TARGET_DIR="${HOME}/src/hosts"
|
ghcr.io/stevenblack/hosts:latest \
|
||||||
|
updateHostsFile.py \
|
||||||
mkdir -p ${HOME}/src
|
--auto \
|
||||||
|
--replace \
|
||||||
if ! [ -d "${TARGET_DIR}" ]; then
|
--extensions \
|
||||||
git clone https://github.com/StevenBlack/hosts.git "${TARGET_DIR}"
|
gambling \
|
||||||
fi
|
porn
|
||||||
|
|
||||||
pip3 install -r "${TARGET_DIR}/requirements.txt"
|
|
||||||
|
|
||||||
cp "${SOURCE_DIR}/hosts" "${TARGET_DIR}/myhosts"
|
|
||||||
|
|
||||||
pushd "${TARGET_DIR}" > /dev/null
|
|
||||||
python3 "updateHostsFile.py" --auto --replace --flush-dns-cache \
|
|
||||||
--extensions gambling porn social
|
|
||||||
popd > /dev/null
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user