diff --git a/.local/bin/uphosts b/.local/bin/uphosts index 6578837..a9e5511 100755 --- a/.local/bin/uphosts +++ b/.local/bin/uphosts @@ -1,20 +1,11 @@ #!/usr/bin/env bash -PACKAGE=hosts -SOURCE_DIR="${HOME}/.config" -TARGET_DIR="${HOME}/src/hosts" - -mkdir -p ${HOME}/src - -if ! [ -d "${TARGET_DIR}" ]; then - git clone https://github.com/StevenBlack/hosts.git "${TARGET_DIR}" -fi - -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 +docker run --pull always --rm -it \ + -v /etc/hosts:/etc/hosts \ + ghcr.io/stevenblack/hosts:latest \ + updateHostsFile.py \ + --auto \ + --replace \ + --extensions \ + gambling \ + porn