aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2015-07-06 21:45:49 +0200
committerJakob Borg <jakob@nym.se>2015-07-06 21:45:49 +0200
commitbc0ce7b820eca834f1454deb09cb176a5e8b716e (patch)
tree1d8e9eda050bc72d86afd17b4fc3a25d6b2bc5c2 /etc
parent1da3a57fe798ca7347431d61ed8e83f1b2d2eb52 (diff)
downloadsyncthing-bc0ce7b820eca834f1454deb09cb176a5e8b716e.tar.gz
syncthing-bc0ce7b820eca834f1454deb09cb176a5e8b716e.zip
launchd: Log to files
Diffstat (limited to 'etc')
-rw-r--r--etc/macosx-launchd/README.md8
-rw-r--r--etc/macosx-launchd/syncthing.plist16
2 files changed, 19 insertions, 5 deletions
diff --git a/etc/macosx-launchd/README.md b/etc/macosx-launchd/README.md
index 685c97657..b5249c2ae 100644
--- a/etc/macosx-launchd/README.md
+++ b/etc/macosx-launchd/README.md
@@ -4,9 +4,8 @@ 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.
+ 2. Edit the `syncthing.plist` by replacing `USERNAME` with your actual
+ username such as `jb`.
3. Copy the `syncthing.plist` file to `~/Library/LaunchAgents`.
@@ -15,3 +14,6 @@ background under Mac OS X.
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`.
diff --git a/etc/macosx-launchd/syncthing.plist b/etc/macosx-launchd/syncthing.plist
index 3112b2600..f4bcd7611 100644
--- a/etc/macosx-launchd/syncthing.plist
+++ b/etc/macosx-launchd/syncthing.plist
@@ -1,5 +1,11 @@
<?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 in ~/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>
@@ -7,13 +13,13 @@
<key>ProgramArguments</key>
<array>
- <string>/Users/jb/bin/syncthing</string>
+ <string>/Users/USERNAME/bin/syncthing</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>HOME</key>
- <string>/Users/jb</string>
+ <string>/Users/USERNAME</string>
<key>STNORESTART</key>
<string>1</string>
</dict>
@@ -26,5 +32,11 @@
<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>