#!/bin/bash clientDir=$1 clientConf=$2 setup=$3 echo "start_monClient started :" echo "clientDir = $clientDir" echo "clientConf = $clientConf" echo "setup = $setup" stamp=$(date +"%F:%R") logfile=${clientDir}/log/terminal.log if [ ! -d ${clientDir}/log ] then mkdir ${clientDir}/log fi if [ -f $logfile ] then mv ${logfile} ${logfile}_${stamp} fi touch $logfile echo "CLIENTSTART: ${stamp}" 2>&1 | tee -a $logfile cd $clientDir . $setup ./hadesonlineclient.exe $clientConf 2>&1 | tee -a $logfile stamp=$(date +"%F:%R") echo "CLIENTSTOP: ${stamp}" 2>&1 | tee -a $logfile