blob: cf245ff46d5eb8093f8fdd9494d0466d13877226 [file] [log] [blame]
Simon Kelley316e2732010-01-22 20:16:09 +00001This is a launchd item for Mac OS X and Mac OS X Server.
2For more information about launchd, the
3"System wide and per-user daemon/agent manager", see the launchd
4man page, or the wikipedia page: http://en.wikipedia.org/wiki/Launchd
5
6This launchd item uses the following flags:
7--keep-in-foreground - this is crucial for use with launchd
8--log-queries - this is optional and you can remove it
9--log-facility=/var/log/dnsmasq.log - again optional instead of system.log
10
11To use this launchd item for dnsmasq:
12
13If you don't already have a folder /Library/LaunchDaemons, then create one:
14sudo mkdir /Library/LaunchDaemons
15sudo chown root:admin /Library/LaunchDaemons
16sudo chmod 775 /Library/LaunchDaemons
17
18Copy uk.org.thekelleys.dnsmasq.plist there and then set ownership/permissions:
19sudo cp uk.org.thekelleys.dnsmasq.plist /Library/LaunchDaemons/
20sudo chown root:admin /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
21sudo chmod 644 /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
22
23Optionally, edit your dnsmasq configuration file to your liking.
24
Josh Soref730c6742017-02-06 16:14:04 +000025To start the launchd job, which starts dnsmasq, reboot or use the command:
Simon Kelley316e2732010-01-22 20:16:09 +000026sudo launchctl load /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
27
28To stop the launchd job, which stops dnsmasq, use the command:
29sudo launchctl unload /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
30
31If you want to permanently stop the launchd job, so it doesn't start the job even after a reboot, use the following command:
32sudo launchctl unload -w /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
33
34If you make a change to the configuration file, you should relaunch dnsmasq;
35to do this unload and then load again:
36
37sudo launchctl unload /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
38sudo launchctl load /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist