Tengo el siguiente agente de launchd:
<?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>Label</key>
<string>bash-check</string>
<key>Program</key>
<string>/Users/spark/tmp/bash-check</string>
<key>StandardOutPath</key>
<string>/Users/laktak/bash-check.log</string>
</dict>
</plist>
Con el siguiente script bash-check
:
#!/usr/local/bin/bash
type bash
bash --version
No puedo hacer que use Bash 5 ( /usr/local/bin/bash
), el registro de launchctl start bash-check
es siempre:
bash is /bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.