# NOTE: Must be an absolute path to guarantee it is read.
INSTALLPATH=/usr/share/monitor/
-$INSTALLPATH/shconfig.py > $INSTALLPATH/monitorconfig.sh
+$INSTALLPATH/commands/shconfig.py > $INSTALLPATH/monitorconfig.sh
source $INSTALLPATH/monitorconfig.sh
cd ${MONITOR_SCRIPT_ROOT}
set -e
echo "#######################################"; echo "Running Monitor at $DATE"; echo "######################################"
echo "Performing API test"
-API=$(./testapi.py)
+API=$(${MONITOR_SCRIPT_ROOT}/tools/testapi.py)
if [ "$API" != "ok" ] ; then
# NOTE: Do not try to run any commands if the API is obviously broken.
echo "API IS DOWN : "`date`
#TODO: should add a call to ssh-add -l to check if the keys are loaded or not.
source ${MONITOR_SCRIPT_ROOT}/agent.sh
-${MONITOR_SCRIPT_ROOT}/tools/syncwithplc.py $DATE || :
+${MONITOR_SCRIPT_ROOT}/commands/syncwithplc.py $DATE || :
service plc restart monitor
echo "Performing FindAll Nodes"