On OSX, once Servoy Server is started, I’d like to see a real-time servoy log sent to a terminal window. I can do this with this command:
tail -F servoy_log.txt
I was wondering if there’s a way to integrate that command into the servoy_server.sh script so it becomes an automatic part of the server startup. My current servoy_server.sh script looks like this:
#!/bin/sh
cd /applications/servoy3.x_server; export DYLD_LIBRARY_PATH=/applications/servoy3.x_server/sybase_db; /Applications/Servoy3.x_Server/sybase_db/dbsrv9 @/Applications/Servoy3.x_Server/sybase_db/sybase.config&while true
do
java -Djava.awt.headless=true -Xmx256m -Xms64m -classpath .:lib/commons-codec.jar:lib/commons-httpclient.jar:lib/activation.jar:lib/antlr.jar:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/commons-pool.jar:lib/concurrent.jar:lib/dom4j.jar:lib/help.jar:lib/dbdialects.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/jdbc2_0-stdext.jar:lib/jmx.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/jug.jar:lib/log4j.jar:lib/mail.jar:lib/naming-factory.jar:lib/naming-resources.jar:lib/ognl.jar:lib/ohj-jewt.jar:lib/oracle_ice.jar:lib/server-bootstrap.jar:lib/servlet-api.jar:lib/wicket-extentions.jar:lib/wicket.jar:lib/xerces.jar com.servoy.j2db.server.ApplicationServer “$@” 1>> server.log 2>> server.log
EXITCODE=$?
if [ “$EXITCODE” != 99 ]; then exit $EXITCODE; fi
done
I don’t know shell scripting and my first two stabs at getting this to work achieved nothing. Any help appreciated.