Run-omicsoft.sh

From Array Suite Wiki

Jump to: navigation, search

At this time, Omicsoft recommends using mono-sgen 2.10.9 or mono-sgen 2.10.9 for running ArrayServerLinuxBeta.exe. This is reflected in the following script.

#!/bin/sh

#First setup environmental variables
#OMICSOFT_HOME should be the path containing ArrayServerLinuxBeta.exe
OMICSOFT_HOME=/opt/omicsoft/dist
#MONO_HOME should be the path containing the installed mono directory (usually mono 2.8.2 for ArrayServerLinuxBeta.exe)
MONO_HOME=/opt/mono
#LOG_OUT sets the log file location and name for running ArrayServerLinuxBeta. All output is written to this file.
LOG_OUT=${OMICSOFT_HOME}/runtime.log
#PROXY_ENV sets the location of a script containing environmental variables for the proxy (This can be excluded in many installations that do not require explicity proxy setting)
PROXY_ENV=${OMICSOFT_HOME}/proxy_env.sh

#PATH sets the path to the location of mono and adds this to the PATH for the current user
 PATH=${MONO_HOME}/bin:$PATH
 export PATH

#LD_LIBRARY_PATH adds the mono directory to the LD_LIBRARY_PATH
 LD_LIBRARY_PATH=${MONO_HOME}/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 
 ### NO EDITS

trap "" HUP

if [ ! -d $OMICSOFT_HOME ] ; then
        echo "FATAL: Bad OMICSOFT_HOME"
        exit 1
fi

if [ -f "${PROXY_ENV}" ] ; then
        . ${PROXY_ENV}
else
        echo "FATAL: Proxy Environment '${PROXY_ENV}' missing"
        exit 1
fi

cd $OMICSOFT_HOME
echo "Running OmicSoft ArrayServer from ${OMICSOFT_HOME}" >> ${LOG_OUT}
echo "Start: `date`" >> ${LOG_OUT}
echo "-----------------------------------------------------------------" >> ${LOG_OUT}
while [ 1 ] ; do
        mono-sgen ArrayServerLinuxBeta.exe 2>&1 | tee -a ${LOG_OUT}
        echo "RESTARTING OmicSoft ArrayServer from ${OMICSOFT_HOME}" >> ${LOG_OUT}
        echo "Start: `date`" >> ${LOG_OUT}
        echo "-----------------------------------------------------------------" >> ${LOG_OUT}
done

See proxy_env.sh for an example of a proxy environmental script. If this is not needed, the following script can be used instead:

#!/bin/sh

#First setup environmental variables
#OMICSOFT_HOME should be the path containing ArrayServerLinuxBeta.exe
OMICSOFT_HOME=/opt/omicsoft/dist
#MONO_HOME should be the path containing the installed mono directory (usually mono 2.8.2 for ArrayServerLinuxBeta.exe)
MONO_HOME=/opt/mono/2.8.2
#LOG_OUT sets the log file location and name for running ArrayServerLinuxBeta. All output is written to this file.
LOG_OUT=${OMICSOFT_HOME}/runtime.log

#PATH sets the path to the location of mono and adds this to the PATH for the current user
 PATH=${MONO_HOME}/bin:$PATH
 export PATH

#LD_LIBRARY_PATH adds the mono directory to the LD_LIBRARY_PATH
 LD_LIBRARY_PATH=${MONO_HOME}/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
 
 ### NO EDITS

trap "" HUP

if [ ! -d $OMICSOFT_HOME ] ; then
        echo "FATAL: Bad OMICSOFT_HOME"
        exit 1
fi
 
cd $OMICSOFT_HOME
echo "Running OmicSoft ArrayServer from ${OMICSOFT_HOME}" >> ${LOG_OUT}
echo "Start: `date`" >> ${LOG_OUT}
echo "-----------------------------------------------------------------" >> ${LOG_OUT}
while [ 1 ] ; do
        mono-sgen ArrayServerLinuxBeta.exe 2>&1 | tee -a ${LOG_OUT}
        echo "RESTARTING OmicSoft ArrayServer from ${OMICSOFT_HOME}" >> ${LOG_OUT}
        echo "Start: `date`" >> ${LOG_OUT}
        echo "-----------------------------------------------------------------" >> ${LOG_OUT}
done