### Start tinc automatically on system boot
-[launchd](http://en.wikipedia.org/wiki/Launchd) is a system for monitoring services and make sure services are started if certain conditions are met. This system is available on OS X 10.5 and later versions.
+[launchd](https://en.wikipedia.org/wiki/Launchd) is a system for monitoring services and make sure services are started if certain conditions are met. This system is available on OS X 10.5 and later versions.
To use launchd, you have to create a property-list file for tinc and put it under /Library/LaunchDaemons/
*/Library/LaunchDaemons/myvpn.tinc.plist*:
- <?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>KeepAlive</key>
- <true/>
- <key>Label</key>
- <string>tinc.myvpn</string>
- <key>ProgramArguments</key>
- <array>
- <string>/opt/local/tinc/sbin/tincd</string>
- <string>-n</string>
- <string>myvpn</string>
- <string>-D</string>
- </array>
- </dict>
- </plist>
-
-This will configure tincd to start the myvpn configuration in the foreground (-D). If tincd is started as background daemon, launchd will not function correctly with tinc. Launchd will directly start tincd if this file is found. The <key>KeepAlive</key> element will ensure that tincd is always running, and to be restarted if it stops. To stop tincd, use the *launchctl* command. Some commands to remember are:
+```
+<?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>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>tinc.myvpn</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/opt/local/tinc/sbin/tincd</string>
+ <string>-n</string>
+ <string>myvpn</string>
+ <string>-D</string>
+ </array>
+</dict>
+</plist>
+```
+
+This will configure tincd to start the myvpn configuration in the foreground (-D). If tincd is started as background daemon, launchd will not function correctly with tinc. Launchd will directly start tincd if this file is found. The `<key>KeepAlive</key>` element will ensure that tincd is always running, and to be restarted if it stops. To stop tincd, use the *launchctl* command. Some commands to remember are:
launchctl unload -w /Library/LaunchDaemons/myvpn.tinc.plist
If tinc has been configured with launchd, you will see tinc.myvpn listed with a process id.
+#### Handle standby and other network interrupts
+
+Tinc automatically tries to reconnect, but this takes time and the longer there
+is no connection, the longer tinc waits to try and reconnect again. A small
+tool is available at https://gitorious.org/tinc-on-osx/networknotify which will
+signal tinc to reconnect when the network connection is available. It uses OS
+X its network reachability framework and can be build using Xcode.
+
---
In the case of compiling tinc the following is required:
-* [XCode](http://developer.apple.com/xcode/)
+* [XCode](https://developer.apple.com/xcode/)
* [LZO libraries](http://www.oberhumer.com/opensource/lzo/)
Before starting, create a new folder `tmp` in your home directory
Having installed Tinc, you can move to the [next section](#config).
-#### Download it
-
-Link: [tincd-1.0.9.zip](/packages/osx/tincd-1.0.9.zip). Please note that this archieve
-provides only the executable and does not include any manual. Once
-downloaded, place the extracted executable into `/usr/sbin/`.
-
### Configuring tinc
Tinc on OS X looks for configuration files in `/usr/etc/tinc`. In