Last active
April 27, 2023 17:29
-
-
Save bebrws/b1cf3e3052b1948074dfb08c4d391ed8 to your computer and use it in GitHub Desktop.
An OSX LaunchAgent plist file for starting sourcegraph on startup. Useful if your running a local sourcegraph instance on an extra Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>dev.bbarrows.sourcegraph-local-server</string> | |
<key>ServiceDescription</key> | |
<string>Start the sorucegraph service on boot</string> | |
<key>Program</key> | |
<string>/usr/local/bin/sourcegraph</string> | |
<key>StandardErrorPath</key> | |
<string>/opt/sg/sg-error.log</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string> | |
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin | |
</string> | |
</dict> | |
<key>RunAtLoad</key> | |
<true /> | |
</dict> | |
</plist> | |
<!-- Some commands to run if you want logging and all like I did: --> | |
<!-- sudo mkdir -p /opt/sg --> | |
<!-- sudo chown `whoami`:staff /opt/sg --> | |
<!-- --> | |
<!-- Now put this plist file here into place so it gets loaded on startup: --> | |
<!-- sudo mv sourcegraph.plist /Library/LaunchAgents/ --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment