all: Mac OS X is now called macOS
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4694 LGTM: imsodin
This commit is contained in:
19
etc/macos-launchd/README.md
Normal file
19
etc/macos-launchd/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
This directory contains an example for running Syncthing in the
|
||||
background under macOS.
|
||||
|
||||
1. Install the `syncthing` binary in a directory called `bin` in your
|
||||
home directory.
|
||||
|
||||
2. Edit the `syncthing.plist` by replacing `USERNAME` with your actual
|
||||
username such as `jb`.
|
||||
|
||||
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.
|
||||
|
||||
Logs are in `~/Library/Logs/Syncthing.log` and, for crashes and exceptions,
|
||||
`~/Library/Logs/Syncthing-Error.log`.
|
||||
42
etc/macos-launchd/syncthing.plist
Normal file
42
etc/macos-launchd/syncthing.plist
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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">
|
||||
<!--
|
||||
Make sure the "syncthing" executable is located at ~/bin/syncthing.
|
||||
Replace the string "USERNAME" in this file with your username, such as "jb".
|
||||
Copy this file to ~/Library/LaunchAgents/syncthing.plist.
|
||||
Execute "launchctl load ~/Library/LaunchAgents/syncthing.plist".
|
||||
-->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>net.syncthing.syncthing</string>
|
||||
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/Users/USERNAME/bin/syncthing</string>
|
||||
</array>
|
||||
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>HOME</key>
|
||||
<string>/Users/USERNAME</string>
|
||||
<key>STNORESTART</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
|
||||
<key>LowPriorityIO</key>
|
||||
<true/>
|
||||
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
|
||||
<key>StandardOutPath</key>
|
||||
<string>/Users/USERNAME/Library/Logs/Syncthing.log</string>
|
||||
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/Users/USERNAME/Library/Logs/Syncthing-Errors.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user