2026-10-02 11:15:59 +01:00
|
|
|
<?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">
|
|
|
|
|
<!--
|
|
|
|
|
LaunchDaemon for the tsunagi agent.
|
|
|
|
|
|
|
|
|
|
A daemon, so it runs as root (creating a utun interface and writing
|
|
|
|
|
/etc/resolver both need it) and comes up at boot before anyone logs in.
|
|
|
|
|
Install it at /Library/LaunchDaemons/cy.hexor.tsunagi.plist, owned by
|
|
|
|
|
root:wheel with mode 0644 — launchd refuses a daemon plist that is
|
|
|
|
|
group- or world-writable. See README.md in this directory.
|
|
|
|
|
|
2026-10-03 02:14:43 +01:00
|
|
|
Edit the binary path if tsng is not at /usr/local/bin/tsng.
|
2026-10-02 11:15:59 +01:00
|
|
|
-->
|
|
|
|
|
<plist version="1.0">
|
|
|
|
|
<dict>
|
|
|
|
|
<key>Label</key>
|
|
|
|
|
<string>cy.hexor.tsunagi</string>
|
|
|
|
|
|
|
|
|
|
<!-- `up` starts the agent and keeps it in the foreground, which is what a
|
|
|
|
|
launchd daemon expects: launchd owns the lifecycle, so the process
|
|
|
|
|
must not daemonise itself. -->
|
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
|
<array>
|
2026-10-03 02:14:43 +01:00
|
|
|
<string>/usr/local/bin/tsng</string>
|
2026-10-02 11:15:59 +01:00
|
|
|
<string>up</string>
|
|
|
|
|
</array>
|
|
|
|
|
|
|
|
|
|
<!-- Start at boot and bring it back if it ever exits. -->
|
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
|
<true/>
|
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
|
<true/>
|
|
|
|
|
|
|
|
|
|
<!-- Back off rather than spin if it fails to start repeatedly. -->
|
|
|
|
|
<key>ThrottleInterval</key>
|
|
|
|
|
<integer>10</integer>
|
|
|
|
|
|
2026-10-03 03:30:47 +01:00
|
|
|
<!-- The control socket belongs to the admin group, so the CLI and the tray
|
|
|
|
|
work without sudo for any administrator. A plain account is not in it
|
|
|
|
|
and cannot manage the agent. -->
|
|
|
|
|
<key>EnvironmentVariables</key>
|
|
|
|
|
<dict>
|
|
|
|
|
<key>TSUNAGI_CONTROL_GROUP</key>
|
|
|
|
|
<string>admin</string>
|
|
|
|
|
</dict>
|
|
|
|
|
|
2026-10-02 11:15:59 +01:00
|
|
|
<!-- Logs. launchd creates these as root; rotate them with newsyslog if you
|
|
|
|
|
keep the daemon around. -->
|
|
|
|
|
<key>StandardOutPath</key>
|
|
|
|
|
<string>/var/log/tsunagi.log</string>
|
|
|
|
|
<key>StandardErrorPath</key>
|
|
|
|
|
<string>/var/log/tsunagi.log</string>
|
|
|
|
|
|
|
|
|
|
<!-- The agent uses the fixed macOS system paths by default:
|
|
|
|
|
state /var/db/tsunagi
|
|
|
|
|
socket /var/run/tsunagi/agent.sock
|
|
|
|
|
so nothing here has to point at a user's home directory. -->
|
|
|
|
|
</dict>
|
|
|
|
|
</plist>
|