Simple dnsmasq wrapper for managing host resolvers
Clone repo
git clone [email protected]:santi6291/dnsmasq-manager
Run Make: make it cli command
make
$ dnsmasq-manager
Usage: dnsmasq-manager [COMMAND] [arg...]
Commands
install [HOSTNAME] To install inital hostname require
uninstall Uninstall dnsmasq and related directories/files
add [HOSTNAME] Add new hostname
rm [HOSTNAME] Remove hostname
$ dnsmasq-manager install [HOSTNAME]
- Give it a hostname for inistal setup
- Installs
dnsmasq
- Creates
/etc/resolver/
directory - Append hostname to
/usr/local/etc/dnsmasq.conf
- Initate on machine boot - copies:
homebrew.mxcl.dnsmasq.plist
->/Library/LaunchDaemons
- Create resolver file
/etc/resolver/[HOSTNAME]
$ dnsmasq-manager uninstall
- removes everythign that was installed above :)
$ dnsmasq-manager add [HOSTNAME]
- adds new hostname
- Append hostname to
/usr/local/etc/dnsmasq.conf
- Create resolver file
/etc/resolver/[HOSTNAME]
$ dnsmasq-manager rm [HOSTNAME]
- remove hostname
- removes hostname from
/usr/local/etc/dnsmasq.conf
- removes resolver file
/etc/resolver/[HOSTNAME]