Created
April 23, 2012 03:41
-
-
Save jonyesno/2468712 to your computer and use it in GitHub Desktop.
runit/dnscache setup for OS X
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/sh | |
# taken from http://qmail.jms1.net/djbdns/osx.shtml | |
# find appropriate uid/gids by $ dscl . -list /Users UniqueID | sort -n -k2 | |
# if you are working with a directory services path other than the | |
# local machine, put the correct path here. | |
DSPATH="." | |
# if you need different numeric UID/GID values, set them here | |
NGID="300" # for group djbdns | |
RUID="300" # for user dnsrun | |
LUID="301" # for user dnslog | |
dscl "$DSPATH" create /Groups/djbdns PrimaryGroupID $NGID | |
dscl "$DSPATH" create /Users/dnsrun UniqueID $RUID | |
dscl "$DSPATH" create /Users/dnsrun PrimaryGroupID $NGID | |
dscl "$DSPATH" create /Users/dnsrun UserShell /bin/false | |
dscl "$DSPATH" create /Users/dnsrun NFSHomeDirectory /nohome | |
dscl "$DSPATH" create /Users/dnsrun RealName dnsrun | |
dscl "$DSPATH" create /Users/dnslog UniqueID $LUID | |
dscl "$DSPATH" create /Users/dnslog PrimaryGroupID $NGID | |
dscl "$DSPATH" create /Users/dnslog UserShell /bin/false | |
dscl "$DSPATH" create /Users/dnslog NFSHomeDirectory /nohome | |
dscl "$DSPATH" create /Users/dnslog RealName dnslog | |
dscl "$DSPATH" create /Groups/djbdns GroupMembership dnsrun dnslog |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.smarden.runit</string> | |
<key>ServiceDescription</key> | |
<string>runit</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/opt/local/bin/runsvdir</string> | |
<string>/opt/local/var/service</string> | |
<string>................................</string> | |
</array> | |
<key>OnDemand</key> | |
<false/> | |
<key>WorkingDirectory</key> | |
<string>/opt/local/var/service</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</string> | |
</dict> | |
</dict> | |
</plist> |
Author
jonyesno
commented
May 28, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment