packaging/net.krz.signald.plist
64 lines · 2237 bytes
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 User LaunchAgent for signald.
4
5 This is the template for a manual install. `brew services start signald`
6 does not use it — the formula's own service block generates an equivalent
7 plist under Homebrew's control.
8
9 To install by hand:
10
11 mkdir -p ~/Library/Logs/signald ~/Library/LaunchAgents
12 sed -e "s|__HOME__|$HOME|g" -e "s|__PREFIX__|$(brew --prefix)|g" \
13 packaging/net.krz.signald.plist > ~/Library/LaunchAgents/net.krz.signald.plist
14 launchctl load ~/Library/LaunchAgents/net.krz.signald.plist
15
16 Edit ProgramArguments to name the repositories to watch: signald takes them
17 as positional paths, and with none it watches the working directory, which
18 is not useful for a login agent. Create the log directory first — launchd
19 creates the log files but not the directory holding them.
20-->
21<plist version="1.0">
22<dict>
23 <key>Label</key>
24 <string>net.krz.signald</string>
25
26 <key>ProgramArguments</key>
27 <array>
28 <string>__PREFIX__/bin/signald</string>
29 <!-- The hardware collector runs as a child of signald. Naming it here
30 avoids depending on launchd's PATH, which is not the shell's. -->
31 <string>--collector</string>
32 <string>__PREFIX__/bin/macos-collector</string>
33 <!-- Repositories to watch. Replace with your own; add one string per repo. -->
34 <string>__HOME__/git</string>
35 </array>
36
37 <key>RunAtLoad</key>
38 <true/>
39 <key>KeepAlive</key>
40 <dict>
41 <key>SuccessfulExit</key>
42 <false/>
43 </dict>
44
45 <key>StandardOutPath</key>
46 <string>__HOME__/Library/Logs/signald/signald.log</string>
47 <key>StandardErrorPath</key>
48 <string>__HOME__/Library/Logs/signald/signald.err.log</string>
49
50 <!-- signald resolves its socket, db and spool under $XDG_RUNTIME_DIR when
51 set and ~/.local/state/signald otherwise. launchd sets neither, so the
52 agent lands on the ~/.local/state/signald defaults the zsh hook also
53 uses. Keep it that way: a spool the daemon and the hook disagree about
54 is a silently empty terminal metric. -->
55 <key>EnvironmentVariables</key>
56 <dict>
57 <key>HOME</key>
58 <string>__HOME__</string>
59 </dict>
60
61 <key>ProcessType</key>
62 <string>Background</string>
63</dict>
64</plist>