#!/bin/bash
. /home/ROULETTE/common.config #here is configuration of ROULETTE and FC5 locations

#if another instance of this scrpt is already running, exit
#for pid in $(pidof -x $0); do
#    if [ $pid != $$ ]; then
#        echo "[$(date)] : $0 : Process is already running with PID $pid"
#        exit 1
#    fi
#done


#set costumization
echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'JURISDICTION', '', '', 11, NULL, 'DEFAULT');"|/home/ROULETTE/sqlexec.sh
echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'BILL_CURRENCY', '', '', 11, NULL, 'MGA');"|/home/ROULETTE/sqlexec.sh
echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'ACCOUNTING_CURRENCY', '', '', 11, NULL, 'MGA');"|/home/ROULETTE/sqlexec.sh
echo "select RESULT from SET_PARAM('PLATFORM', 'UPDATE_ALL.sh', 'GAMES_ORDER', '', '', 11, NULL, '5');"|/home/ROULETTE/sqlexec.sh
echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'MACHINE_TIMEZONE', '', '', 11, NULL, 'Africa/Nairobi');"|/home/ROULETTE/sqlexec.sh

echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'DEF_LANGUAGE', '', '', 11, NULL, '18');"|/home/ROULETTE/sqlexec.sh
echo "select RESULT from SET_PARAM('GLOBAL', 'UPDATE_ALL.sh', 'MENU_LANGUAGE', '', '', 11, NULL, '18');"|/home/ROULETTE/sqlexec.sh
#echo "delete FROM CONFIGURATION WHERE ATTR_NAME like 'KEY\_%' ESCAPE '\';"|/home/ROULETTE/sqlexec.sh

#to je menda obsolete
echo "update languages set VISIBLE=1 where LANG_ID=18"|/home/IGP/sqlexec.sh


#SINGLE or DOUBLE ZERO for roulette games
echo "select result from SET_PARAM('GLOBAL', 'UPDATE', 'IS_DOUBLE_ZERO', '', '', 11, 0, '0');"|/home/ROULETTE/sqlexec.sh
echo "select result from SET_PARAM('WHEEL_1', 'UPDATE', 'ZERO_NUMBER_OFFSET', '', '', 11, 36, '36');" | /home/ROULETTE/sqlexec.sh
