ios - Bash script running from launchDaemon on MAC - not connecting to jenkins -


I have a very simple plast file that needs to run my script:

  Lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE plist PUBLIC "- // Apple Computer / DTI / PLIST 1.0 /" n "" http://www.apple.com/DTDs/PropertyList-1.0.dtd"> & Lt; Plist version = "1.0" & gt; & Lt; Dict & gt; & Lt; Key & gt; Label & lt; / Key & gt; & Lt; String & gt; Com.example.ci & lt; / String & gt; & Lt; Key & gt; ProgramArguments & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; Sh & lt; / String & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/my_scripts/run_jenkins.sh< / String & gt; & Lt; / Array & gt; & Lt; Key & gt; KeepAlive & lt; / Key & gt; & Lt; True /> & Lt; Key & gt; StandardOutPath & lt; / Key & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/stdout.log< / String & gt; & Lt; Key & gt; StandardErrorPath & lt; / Key & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/error.log< / String & gt; & Lt; / Dict & gt; & Lt; / Plist & gt;  

And when I do not have anything to run it - I mean that when I run sh run_jenkins.sh it connects to my Jenkins server But when I run it from sudo launchct org.jenkins-ci.plist it does not connect. Am I missing something?

You are launching "load" or command in the launcheat:

 < Code> sudo launchctl load -w org.jenkins-ci.plist sudo launchct org.jenkins-ci.plist  

You should make your script executable,

  chmod + x "/ users / shred / jenkins / home / my_script / roman_jenkins." By using  

and remove your "sh" line, plist file.

And make sure your script starts right with the Shebang line:

  #! / Bin / sh  

and set permissions on your plist file:

  chmod 644 org.jenkins-ci.plist  

Comments