Skip to content
Permalink
8a29254656
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 37 lines (29 sloc) 873 Bytes
#!/bin/bash
LOGHOST="collector.testbed.tier.internet2.edu"
LOGPORT="5001"
if [ -s /opt/tier/env.bash ]; then
. /opt/tier/env.bash
fi
messagefile="/tmp/beaconmsg"
if [ -z "$TIER_BEACON_OPT_OUT" ]; then
cat > $messagefile <<EOF
{
"msgType" : "TIERBEACON",
"msgName" : "TIER",
"msgVersion" : "1.0",
"tbProduct" : "midPoint",
"tbProductVersion" : "$MP_VERSION",
"tbTIERRelease" : "$TIER_RELEASE",
"tbMaintainer" : "$TIER_MAINTAINER"
}
EOF
# echo "going to send TIER beacon to ${LOGHOST}:${LOGPORT}:"
# cat $messagefile
curl -s -XPOST "${LOGHOST}:${LOGPORT}/" -H 'Content-Type: application/json' -T $messagefile 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "TIER beacon sent"
else
echo "Failed to send TIER beacon"
fi
rm -f $messagefile 1>/dev/null 2>&1
fi