From: beierlm Date: Tue, 24 May 2022 20:30:21 +0000 (-0400) Subject: Add track to charmed install X-Git-Tag: v10.1.1-rc1~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F24%2F12124%2F2;p=osm%2Fdevops.git Add track to charmed install In master, there is a track function that is its own bash script. In v10.0 this needs to be added to the installer source code directly Change-Id: I81b001439b157671a27be0faf723dde5f755dc1d Signed-off-by: beierlm --- diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 4d84de41..b7ea2a2d 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -36,6 +36,21 @@ else } fi +function track(){ + ctime=`date +%s` + duration=$((ctime - SESSION_ID)) + url="http://www.woopra.com/track/ce?project=osm.etsi.org&cookie=${SESSION_ID}" + event_name="bin" + event_name="${event_name}_$1" + url="${url}&event=${event_name}&ce_duration=${duration}" + wget -q -O /dev/null $url +} + +function FATAL_TRACK(){ + track + exit 1 +} + MODEL_NAME=osm