Difference between revisions of "Template:SQWareProduction sqwgen IndicatorsVar.cfg content"

From Wiki_dbSQWare
Jump to: navigation, search
m (Updated by BatchUser)
 
m (Updated by BatchUser)
 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
File content:
 
File content:
 
<pre>
 
<pre>
#!/bin/ksh
+
#!/bin/bash
 
###################################################################
 
###################################################################
# SQWareProduction Generic module of dbSQWare is developped with GPL License 3.0 :
+
# SQWareProduction Generic module of dbSQWare
#
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
 
#  
 
#  
 
# dbSQWare is distributed in the hope that it will be useful,
 
# dbSQWare is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
+
# CGU/CGA for more details.
 
#  
 
#  
# You should have received a copy of the GNU General Public License
+
# You should have received a copy of the CGU/CGA
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
# along with this program.  If not, see <http://www.dbsqware.com/licenses/>.
 
#  
 
#  
 
# For information : contact@dbsqware.com or www.dbsqware.com
 
# For information : contact@dbsqware.com or www.dbsqware.com
 
###################################################################
 
###################################################################
 
## @Synopsis Generic global var for indicators scripts
 
## @Synopsis Generic global var for indicators scripts
## @Copyright Copyright 2010-2014, OctopusDBA (www.octopusdba.com)
+
## @Copyright Copyright 2007-2025, dbSQWare (www.dbsqware.com)
## @License GPL v3
 
  
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $gvsqw_GenPath/../../generic/etc/sqwgen_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../generic/etc/sqwgen_IndicatorsVar.cfg"
 
fi
 
fi
  
#for Check backups
+
#for indicators
if [ "$(date +'%a')" = "Mon" ]
 
then
 
export gvsqw_NbDaysFull=3
 
else
 
export gvsqw_NbDaysFull=2
 
fi
 
 
 
#for purge indicators tables (in number of month)
 
export gvsqw_PurgeLongTerm=24
 
export gvsqw_PurgeMediumTerm=4
 
export gvsqw_PurgeShortTerm=2
 
  
 
###################################################################################################
 
###################################################################################################
Line 52: Line 35:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
 
fi
 
fi
 
. $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
 
. $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
Line 59: Line 42:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
 
fi
 
fi
 
. $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
 
. $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
Line 66: Line 49:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
 
fi
 
fi
 
. $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
 
. $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
Line 75: Line 58:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg"
 
fi
 
fi
 
. $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg
 
. $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg
Line 87: Line 70:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 94: Line 77:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 101: Line 84:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 110: Line 93:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 117: Line 100:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 124: Line 107:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
Line 132: Line 115:
 
if [ "$gvsqw_Debug" != "" ]
 
if [ "$gvsqw_Debug" != "" ]
 
then
 
then
echo "sourcing cfg file : $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
+
echo $gvsqw_EchoOpt "sourcing cfg file : $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
 
fi
 
fi
 
. $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
. $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
 
fi
 
fi
 
fi
 
fi
 +
 
</pre>
 
</pre>

Latest revision as of 16:08, 23 February 2025


File content:

#!/bin/bash
###################################################################
# SQWareProduction Generic module of dbSQWare
# 
# dbSQWare is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# CGU/CGA for more details.
# 
# You should have received a copy of the CGU/CGA
# along with this program.  If not, see <http://www.dbsqware.com/licenses/>.
# 
# For information : contact@dbsqware.com or www.dbsqware.com
###################################################################
## @Synopsis	Generic global var for indicators scripts
## @Copyright	Copyright 2007-2025, dbSQWare (www.dbsqware.com)

if [ "$gvsqw_Debug" != "" ]
then
	echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../generic/etc/sqwgen_IndicatorsVar.cfg"
fi

#for indicators

###################################################################################################
###################################################################################################

# Source generic custom
eval lvsqw_Tmp="\$gvsqw_${gvsqw_RdbmsTrigram}Bin"
if [ -r $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg ]
then
	if [ "$gvsqw_Debug" != "" ]
	then
		echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
	fi
	. $gvsqw_GenPath/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
elif  [ -r $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg ]
then
	if [ "$gvsqw_Debug" != "" ]
	then
		echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
	fi
	. $lvsqw_Tmp/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
elif  [ -r $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg ]
then
	if [ "$gvsqw_Debug" != "" ]
	then
		echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg"
	fi
	. $(dirname $0)/../../generic/etc_cust/sqwgen_IndicatorsVar.cfg
fi

# For not normed environnement
if [ -r $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg ]
	if [ "$gvsqw_Debug" != "" ]
	then
		echo $gvsqw_EchoOpt "sourcing cfg file : $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg"
	fi
	. $HOME/sqwConfig/sqwgen_IndicatorsVar.cfg
fi

if [ "$gvsqw_RdbmsType" != "generic" ]
then
	# Source rdbms global
	if [ -r $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	elif  [ -r $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	elif  [ -r $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $(dirname $0)/../../$gvsqw_RdbmsType/etc/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	fi
	# Source rdbms custom
	if [ -r $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $gvsqw_GenPath/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	elif  [ -r $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $lvsqw_Tmp/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	elif  [ -r $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
	then
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $(dirname $0)/../../$gvsqw_RdbmsType/etc_cust/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	fi
	# For not normed environnement
	if [ -r $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg ]
		if [ "$gvsqw_Debug" != "" ]
		then
			echo $gvsqw_EchoOpt "sourcing cfg file : $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg"
		fi
		. $HOME/sqwConfig/sqw${gvsqw_RdbmsRoot}_IndicatorsVar.cfg
	fi
fi