Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refine launchd job: onDemand is deprecated; add KeepAlive section; no

need to put under /System folder;
  • Loading branch information...
commit 8cd68687f7c94fc3988f95d6669433145c558de3 1 parent 3a9e581
@hewigovens hewigovens authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 local/addto-startup.py
View
17 local/addto-startup.py
@@ -23,8 +23,6 @@ def main_macos():
<string>wheel</string>
<key>Label</key>
<string>org.goagent.macos</string>
- <key>OnDemand</key>
- <false/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
@@ -32,12 +30,6 @@ def main_macos():
</array>
<key>RunAtLoad</key>
<true/>
- <key>ServiceIPC</key>
- <true/>
- <key>StandardErrorPath</key>
- <string>%(dirname)s/proxy.log</string>
- <key>StandardOutPath</key>
- <string>%(dirname)s/proxy.log</string>
<key>UserName</key>
<string>root</string>
<key>WorkingDirectory</key>
@@ -46,9 +38,14 @@ def main_macos():
<string>/var/log/goagent.log</string>
<key>StandardErrorPath</key>
<string>/var/log/goagent.log</string>
+ <key>KeepAlive</key>
+ <dict>
+ <key>SuccessfulExit</key>
+ <false/>
+ </dict>
</dict>
</plist>''' % dict(dirname=os.path.abspath(os.path.dirname(__file__)))
- filename = '/System/Library/LaunchDaemons/org.goagent.macos.plist'
+ filename = '/Library/LaunchDaemons/org.goagent.macos.plist'
print 'write plist to %s' % filename
with open(filename, 'wb') as fp:
fp.write(PLIST)
@@ -59,6 +56,8 @@ def main_macos():
print 'Adding CA.crt to system keychain Failed!'
sys.exit(0)
print 'Adding CA.crt to system keychain Done'
+ print 'To start goagent right now, try this command: sudo launchctl load /Library/LaunchDaemons/org.goagent.macos.plist'
+ print 'To checkout log file: using Console.app to locate /var/log/goagent.log'
def main_linux():
pass
Please sign in to comment.
Something went wrong with that request. Please try again.