#!/bin/sh
# STTA Rev. 1.3 Copyright (c) 2001-2003 Jess Prez Lorenzo  --- license GNU GPL 
# stta: (@#) 1.3pre1049295437- [2003_4_02_165717]
# Runner to call TTA Perl Montitor

USAGE="monitor.sh [Task: auto | task ] ";
if [ $1 ] ; then      
   TASK=$1
else
   echo "$USAGE";
   exit 2
fi

[ "$STTA" ] && . $STTA/envprofile

TTAmonPath=`cat /etc/webmin/miniserv.conf | egrep "^root=" | sed 's/root=//g'`/stta
TTAmonCMD=monitor.pl


# move to TTAmonPath otherwise libs.pl will be not loaded

cd $TTAmonPath 

exec ./$TTAmonCMD $*
