#!/bin/bash

while ( : ) do
        DATE=`date`
        if [ -r .shutdown ]; then
                rm -f .shutdown
        fi

       export LD_LIBRARY_PATH=/EP5/CashServer/libmysqlclient.so.18.0.0:$LD_LIBRARY_PATH  
	./CashServer start

        DATE2=`date`
        if [ -r .shutdown ]; then
                echo "***** Shutdown $DATE ~ $DATE2" >> rebootlog
                exit
        fi

        echo "!!!!! Reboot $DATE ~ $DATE2" >> rebootlog
        sleep 2
done

