Skip to content

Instantly share code, notes, and snippets.

@passuf
Last active August 29, 2015 14:17
Show Gist options
  • Save passuf/7deceeeb8d802eb4a6f9 to your computer and use it in GitHub Desktop.
Save passuf/7deceeeb8d802eb4a6f9 to your computer and use it in GitHub Desktop.
Syncthing Setup

Install syncthing:

brew install syncthing

Create file /Users/passuf/Library/LaunchAgents/net.syncthing.osx.plist:

<?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>net.syncthing.osx</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/syncthing</string>
    </array>
    <key>EnvironmentVariables</key>
    <dict>
        <key>HOME</key>
        <string>/Users/passuf</string>
	<key>STNORESTART></key>
	<string>1</string>
    </dict>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/Users/passuf/.log/syncthing.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/passuf/.log/syncthing-error.log</string>
    <key>Debug</key>
    <true/>
  </dict>
</plist>

Load the service:

launchctl load /Users/passuf/Library/LaunchAgents/net.syncthing.osx.plist

If you want to unload the service:

launchctl unload /Users/passuf/Library/LaunchAgents/net.syncthing.osx.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment