what does launchd status 78 mean?? why my user agent not running??

后端 未结 9 1589
遇见更好的自我
遇见更好的自我 2021-01-31 15:18

I want to run a unison sync service running in the background whenever I login. But the status code of my agent is 78. I don\'t know why, I tried some fix posted on

9条回答
  •  逝去的感伤
    2021-01-31 16:02

    Here's what caught me: In Mac OS X you can run shell-scripts from command-line even if there's "just the script" in the file. However, when you run them from launchd you have to tell which binary that should run the script. A suppose that when you run from command-line it just uses the shell you are currently in (in my case bash), but when running from launchd there is no "surrounding script". I added

    #!/bin/sh
    

    as the first line in the script file, and then it worked.

提交回复
热议问题