Skip to content

Commit

Permalink
Add lepotato usage statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Nov 12, 2024
1 parent 2a3807b commit 7d4e97c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
LEPOTATO_SERIAL=/sys/bus/platform/drivers/meson-sm/firmware:secure-monitor/serial
until $(curl --output /dev/null --silent --head --fail USAGE_STATISTICS_URL/boot?id=`cat "${LEPOTATO_SERIAL}" | grep -i '^Serial' | awk '{ print $3 }' | sha1sum | awk '{ print $1 }' `'&version='`cat USAGE_STATISTICS_VERSION_FILE | head -n 1`'&variant='`cat /etc/dist_variant | head -n 1` ); do
echo "$(date): try to connect and report boot"
sleep 5
done
3 changes: 3 additions & 0 deletions src/modules/usage-statistics/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ apt-get update --allow-releaseinfo-change
apt-get -y install curl

unpack /filesystem/root /
if [ "${BASE_BOARD}" == "debian_lepotato" ]; then
unpack /filesystem/root_lepotato /
fi

# Set hotspot name and password
sed -i s"@USAGE_STATISTICS_URL@$USAGE_STATISTICS_URL@g" /usr/bin/boot_report
Expand Down

0 comments on commit 7d4e97c

Please sign in to comment.