Skip to content
Snippets Groups Projects
Commit 9dd8212c authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

agent: Remove old files

parent d85646b2
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Copyright (C) 2009-2012 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of collect-agent
#
# collect-agent 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 2
# of the License, or (at your option) any later version.
#
# This program 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
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# set PREFIX
export PREFIX="$(readlink -f "$(dirname $0)/../../")"
# run datasid-common.sh
source "$(readlink -f "$(dirname $0)/../../")/bin/datasid-common.sh" > /dev/null 2>&1 || exit 1
if test -z "${PREFIX}"; then
exit 2
fi
# Telecentro data that will be collected
COLLECTDATA=( superid=superid
user_count=usuarios )
index=0;
# Collect telecentro's info
while [ $index != ${#COLLECTDATA[@]} ]
do
tagName=$(echo ${COLLECTDATA[$index]} | awk -F'=' '{print $1}')
collect=$(echo ${COLLECTDATA[$index]} | awk -F'=' '{print $2}')
value=$(cat ${CONFDIR}/telecentroInfo | grep $collect | awk -F'=' '{print $2}')
# Check if the data exists
index=$(($index + 1))
test -z "${value}" && exit $(($index + 2))
printf "<$tagName>$value</$tagName>"
done
#!/bin/bash
# Copyright (C) 2009-2012 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of collect-agent
#
# collect-agent 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 2
# of the License, or (at your option) any later version.
#
# This program 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
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# set PREFIX
export PREFIX="$(readlink -f "$(dirname $0)/../../")"
# run datasid-common.sh
source "$(readlink -f "$(dirname $0)/../../")/bin/datasid-common.sh" > /dev/null 2>&1 || exit 1
if test -z "${PREFIX}"; then
exit 2
fi
# Check if telecentroInfo exists
test -f ${CONFDIR}/telecentroInfo || exit 3
# Collect telecentro id
SUPERID=$(grep "superid" ${CONFDIR}/telecentroInfo | awk -F'=' '{print $2}')
test -z ${SUPERID} && exit 4
echo $SUPERID
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment