Add track to charmed install 24/12124/2
authorbeierlm <mark.beierl@canonical.com>
Tue, 24 May 2022 20:30:21 +0000 (16:30 -0400)
committerbeierlm <mark.beierl@canonical.com>
Wed, 25 May 2022 13:49:34 +0000 (09:49 -0400)
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 <mark.beierl@canonical.com>
installers/charmed_install.sh

index 4d84de4..b7ea2a2 100755 (executable)
@@ -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