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