Commit f6475d66 authored by Pavel Weber's avatar Pavel Weber
Browse files

Merge branch 'master' into 'master'

Master

See merge request EUDAT-TOOLS/SVMON/svmon.client!1
parents 12044b5b 1b92b69f
......@@ -15,6 +15,7 @@ function usage {
echo "-c | --config Path to configuration file"
echo "-t | --test Check that all version are collected properly without sending data to the server"
echo "-s | --send Collect and send versions to the server"
echo "-p | --print Print the collected info to the stoud"
}
#if no parameters supplied display usage
......@@ -32,7 +33,8 @@ if [ $# -eq 0 ]
test=
send=
CONFIG_FILE='./versions_monitoring.cfg'
#CONFIG_FILE='../config/versions_monitoring.cfg'
CONFIG_FILE='/svmonapp/svmonclientold/svmon.client/config/versions_monitoring.cfg'
while [ "$1" != "" ]; do
case $1 in
......@@ -43,6 +45,8 @@ while [ "$1" != "" ]; do
;;
-s | --send ) send=1
;;
-p | --print ) print=1
;;
-h | --help ) usage
exit
;;
......@@ -248,16 +252,33 @@ fi
#=============================================================#
# Test output values #
#=============================================================#
echo "Site : $site"
echo "Endpoint : $endpoint"
echo "Operating System: $operating_system"
if [[ "$test" -eq 1 ]]
then
echo "Site : $site"
echo "Endpoint : $endpoint"
echo "Operating System: $operating_system"
for K in "${!parameter[@]}";
do
echo "Conf. Parameters: ${K} ${parameter[$K]}"
done
fi
#=============================================================#
# Print data to the console #
#=============================================================#
#echo "Site : $site"
#echo "Endpoint : $endpoint"
#echo "Operating System: $operating_system"
if [[ "$print" -eq 1 ]]
then
for K in "${!parameter[@]}";
do
output="$site\t$endpoint\t$operating_system\t$component\t$K\t${parameter[$K]}\n"
printf $output
done
fi
#=============================================================#
# Send data to the server with curl #
#=============================================================#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment