Skip to content

Latest commit

 

History

History
31 lines (30 loc) · 760 Bytes

README.md

File metadata and controls

31 lines (30 loc) · 760 Bytes

hosts-creator

FEATURES

  • Configuration file
  • Colored output
  • Download and merge multiple host lists
  • remove comments, trailing spaces and duplicate lines from new hosts file
  • replace new hosts file with /etc/hosts
  • use rdo or doas if available, if not use sudo
  • backup old /etc/hosts file
  • error management while using doas(sudo or rdo)
  • size check(if file is > 60M, it reports to you)

Deps

  • (doas, sudo or rdo)
  • curl
  • awk
  • hostname

Usage

clone the repository and enter into directory

$ git clone https://github.com/XDream8/hosts-creator
$ cd hosts-creator

edit the configuration with your favourite editor

$ nvim config

run the script

$ ./hosts-creator.sh