Skip to content

Instantly share code, notes, and snippets.

@n8felton
Created October 3, 2022 21:48
Show Gist options
  • Save n8felton/cc3da6e5a2616b016230cfbf5e3bbd2a to your computer and use it in GitHub Desktop.
Save n8felton/cc3da6e5a2616b016230cfbf5e3bbd2a to your computer and use it in GitHub Desktop.
Comparing generated launchd.plist from before and after changes to github.com/kardianos/service
<?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>EnvironmentVariables</key>
<dict>
<key>test</key>
<string>1</string>
<key>toor</key>
<string>2</string>
</dict>
<key>Label</key>
<string>GoServiceExampleSimple</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/thingy</string>
<string>--user</string>
<string>groot</string>
</array>
<key>UserName</key>
<string>groot</string>
<key>RootDirectory</key>
<string>/change/root/dir</string>
<key>WorkingDirectory</key>
<string>/test/working/directory</string>
<key>SessionCreate</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>Disabled</key>
<false/>
<key>StandardOutPath</key>
<string>/tmp/StandardOutPath</string>
<key>StandardErrorPath</key>
<string>/tmp/StandardOutPath</string>
</dict>
</plist>
<?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>Disabled</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>test</key>
<string>1</string>
<key>toor</key>
<string>2</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>GoServiceExampleSimple</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/thingy</string>
<string>--user</string>
<string>groot</string>
</array>
<key>RootDirectory</key>
<string>/change/root/dir</string>
<key>RunAtLoad</key>
<true/>
<key>SessionCreate</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/StandardOutPath</string>
<key>StandardOutPath</key>
<string>/tmp/StandardOutPath</string>
<key>UserName</key>
<string>groot</string>
<key>WorkingDirectory</key>
<string>/test/working/directory</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment