Created
August 20, 2014 16:04
-
-
Save rnagle/da6de681cda541e7deac to your computer and use it in GitHub Desktop.
Utility script for stopping, starting and restarting dnsmasq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install: | |
# | |
# Copy this file to a location included in your PATH. | |
# | |
# Usage: | |
# | |
# $ dnsmasqutil stop|start|restart | |
# | |
# Notes: | |
# | |
# - You will probably need to use sudo with this utility | |
# - Assumes you installed dnsmasq via homebrew | |
# | |
if [ $1 == 'start' ] | |
then | |
launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist; | |
elif [ $1 == 'stop' ] | |
then | |
launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist; | |
elif [ $1 == 'restart' ] | |
then | |
launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist; | |
launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment