#!/bin/sh # $Id: launcher.cgi 64532 2018-02-23 21:39:20Z pomakis $ # Prepare the environment. ENVDIR=/usr/local/cubewerx/config/env source "$ENVDIR/cubewerx.sh" [ -f "$ENVDIR/oracle.sh" ] && source "$ENVDIR/oracle.sh" [ -f "$ENVDIR/ec2.sh" ] && source "$ENVDIR/ec2.sh" # Invoke the executable. EXECNAME=`basename $0 .cgi | sed 's/^htcubeserv/cubeserv/'` if [ -f ./${EXECNAME}-bin -a -x ./${EXECNAME}-bin ]; then ./${EXECNAME}-bin elif [ -f $CW_HOME/web/bin/$EXECNAME -a -x $CW_HOME/web/bin/$EXECNAME ]; then $CW_HOME/web/bin/$EXECNAME else echo Content-Type: text/plain echo echo $EXECNAME executable not found fi