From: mbent Date: Wed, 11 Apr 2012 12:47:48 +0000 (+0200) Subject: (no commit message) X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=42aee132d03789731a8c883ddc56c4ed1ccffb3f;p=wiki --- diff --git a/examples/osx-install.mdwn b/examples/osx-install.mdwn index a08226f..b8384fe 100644 --- a/examples/osx-install.mdwn +++ b/examples/osx-install.mdwn @@ -40,7 +40,7 @@ Update the ports system and ports list. sudo port selfupdate sudo port sync -This command will install tinc and all the necessary dependancies. +This command will install tinc and all the necessary dependencies. sudo port install tinc @@ -49,6 +49,58 @@ Configuration files are located in /opt/local/etc/tinc. Tinc can now be configured and executed. +### 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. + +To use launchd, you have to create a property-list file for tinc and put it under /Library/LaunchDaemons/ + +The following example is a plist file for the tinc network name: myvpn + +*/Library/LaunchDaemons/myvpn.tinc.plist*: + + + + + + KeepAlive + + Label + tinc.myvpn + ProgramArguments + + /opt/local/tinc/sbin/tincd + -n + myvpn + -D + + + + +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 KeepAlive 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 + +This adds a *disabled* key to the file and stops tincd. The disabled key ensure that launchd will not start tincd anymore. The inverse operation is: + + launchctl load -w /Library/LaunchDaemons/myvpn.tinc.plist + +This removes the *disabled* key from the file and starts tincd. + +To stop tinc: + + launchctl stop tinc.myvpn + +To list all services monitored by launchd: + + launchctl list + +If tinc has been configured with launchd, you will see tinc.myvpn listed with a process id. + + +--- + + ### Alternative Installation Methods There are two alternative methods of getting tinc: @@ -181,5 +233,6 @@ the two existing files (if applicable). * * * * * +- Mike Bentzen (mike (at) bentzen . com . au) - Grzegorz Dymarek (gd58 (at) alumni . st-andrews . ac . uk) -- Mike Bentzen (mike (@) goodlook . com . au) +- wizztick