From 2e68ee5c8b07e7a56738c6c62d3d566883dcdf57 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 24 Nov 2014 13:46:38 +0100 Subject: [PATCH] Add example for Mac OS X background running --- etc/macosx-launchd/README.md | 17 +++++++++++++++++ etc/macosx-launchd/syncthing.plist | 30 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 etc/macosx-launchd/README.md create mode 100644 etc/macosx-launchd/syncthing.plist diff --git a/etc/macosx-launchd/README.md b/etc/macosx-launchd/README.md new file mode 100644 index 000000000..685c97657 --- /dev/null +++ b/etc/macosx-launchd/README.md @@ -0,0 +1,17 @@ +This directory contains an example for running Syncthing in the +background under Mac OS X. + + 1. Install the `syncthing` binary in a directory called `bin` in your + home directory. + + 2. Edit the `syncthing.plist` file in the two places that refer to your + home directory; that is, replace `/Users/jb` with your actual home + directory location. + + 3. Copy the `syncthing.plist` file to `~/Library/LaunchAgents`. + + 4. Log out and in again, or run `launchctl load + ~/Library/LaunchAgents/syncthing.plist`. + +You probably want to turn off "Start Browser" among the settings to +avoid it opening a browser window on each login. diff --git a/etc/macosx-launchd/syncthing.plist b/etc/macosx-launchd/syncthing.plist new file mode 100644 index 000000000..3112b2600 --- /dev/null +++ b/etc/macosx-launchd/syncthing.plist @@ -0,0 +1,30 @@ + + + + + Label + net.syncthing.syncthing + + ProgramArguments + + /Users/jb/bin/syncthing + + + EnvironmentVariables + + HOME + /Users/jb + STNORESTART + 1 + + + KeepAlive + + + LowPriorityIO + + + ProcessType + Background + +