Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
Created May 29, 2021 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rojenzaman/695ed569e32440fa379d387c22f47d77 to your computer and use it in GitHub Desktop.
Save rojenzaman/695ed569e32440fa379d387c22f47d77 to your computer and use it in GitHub Desktop.
/etc/hosts file refer to another configuration file
#!/bin/bash
case $1 in
0|--disable) cat /etc/hosts.local > /etc/hosts ;;
1|--enable) cat /etc/hosts.local > /etc/hosts ; cat /etc/hosts.d/* >> /etc/hosts ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment