Created LaunchAgent on MacOS (markdown)

morpheus65535 2019-03-14 06:42:26 -04:00
parent 74a681d3cd
commit 54495a5692

35
LaunchAgent-on-MacOS.md Normal file

@ -0,0 +1,35 @@
As-is, the LaunchAgent expects bazarr to be cloned or installed at /Applications/bazarr. If this is counter to other documentation I recommend amending the file contents.
You have to be running Python installed through Brew.
The LaunchAgent should be named com.github.morpheus65535.bazarr.plist - again, if you'd like something else, update the Label in the file itself as well.
The file is installed to ~/Library/LaunchAgents and the service will start when the user logs into the system. After installation, the service can be started immediately by running launchctl load ~/Library/LaunchAgents/com.github.morpheus65535.bazarr.plist. The service can be stopped by running the same command replacing load with unload.
Logs are written to /usr/local/var/log/bazarr.log.
Here's the file:
```
<?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">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.morpheus65535.bazarr</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/python</string>
<string>/Applications/bazarr/bazarr.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/bazarr.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/bazarr.log</string>
</dict>
</plist>
```