Trying to figure out why a launchd user agent won't run a bash script.
I'm trying to write a bash script that creates a couple of other shell scripts and loads them into launchd as user agents.
I'm stuck. Here's the current script: https://github.com/sethgoldin/davinci-resolve-postgresql-workflow-tools/blob/mac os-unified-tools/davinci-resolve-postgresql-workflow-tools-optimize-agent-macos/ macOS/automate-workflow.sh
Running the shell scripts inside
/backup
and /optimize
manually works fine, but launchd just doesn't run them for some reason. Furthermore, launchctl list
is showing the backup
agent with an exit code of 0, but the optimize
agent with an exit code of 127.My hunch is that something is amiss down in the heredocs that create the launchd user agents, on lines 65-82 and 84-101.
Can any launchd gurus help me out?
I'm on macOS 10.12.6.