The following code is from Marcel Trapman.
- Code: Select all
#!/bin/sh
cd /Applications/Servoy
export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db
/Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config &
while true
do
java -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar com.servoy.j2db.server.ApplicationServer "$@"
EXITCODE=$?
if [ "$EXITCODE" != 99 ]; then exit $EXITCODE; fi
done
sybase.config (in /Applications/<servoy folder>/sybase_db/
In the Startup items for this account (SystemPreferences/Accounts/AccountName) call for this shell script.
That's it.
I've seen reports on Servoy Talk about having difficulties getting Sybase to start. With the above script and method on an Xserve I'm not having issues.
I tried and utterly failed on this particular Xserve to use Apple's recommended method for auto starting a service -- create a StartupItems directory in the root Library, clone an existing startup from /System/Library/StartupItems, edit the startup file and the plist. Many attempts with recommendations from several knowledgeable Servoy and Mac consultants all failed. In the end logging in as a particular user and having that user auto start the shell works.
Kind regards,