Skip to content

Instantly share code, notes, and snippets.

@britishtea
Last active July 13, 2016 08:49
Show Gist options
  • Save britishtea/5d724e519c43eeb29ca7 to your computer and use it in GitHub Desktop.
Save britishtea/5d724e519c43eeb29ca7 to your computer and use it in GitHub Desktop.
Run terco on login on Mac OS X
This are instructions to run terco on login on Mac OS X.
1. Install terco using the system ruby (sudo gem install terco).
2. Copy the script below to ~/Library/LaunchAgents/com.soveran.terco.plist. You may have to replace `/usr/local/bin/terco`, if terco has been installed to a different directory (use `which terco` to find out).
3. Load the script using the command
sudo launchctl load ~/Library/LaunchAgents/com.soveran.terco.plist
To make a domain resolve to localhost follow these instructions:
1. Create the directory /etc/resolver if it doesn't already exist.
sudo mkdir -p /etc/resolver
2. Create a file with the name of the domain you wish to resolve.
sudo sh -c 'echo "nameserver 127.0.0.1" > /etc/resolver/{domain}'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.soveran.terco</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/terco</string>
<string>53</string>
</array>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>root</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment