I have a script startup.sh
shell that does the following (create a RAM disk and run the teamcity agent):
#!/bin/bash DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://16777216` /usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK /Users/administrator/buildAgent/bin/agent.sh start
I can run this from the command line by typing ./startup.sh
and it works correctly. When I start from start, it ONLY creates a RAM disk, teamcity does not start.
My starting layer is in ~ / Library / LaunchAgents
<?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>com.datafinch.teamcity</string> <key>Program</key> <string>/Users/administrator/startup.sh</string> <key>RunAtLoad</key> <true/> </dict> </plist>
What am I missing?
EDIT
Here is the agent.sh file:
https://gist.github.com/chriskooken/19f5856e3ce3c2322c53cb0afa69b057
source share