From 4d3d1c059411197a696ab0660710752134425f82 Mon Sep 17 00:00:00 2001 From: Mahesh Asolkar Date: Sun, 7 Dec 2025 19:04:06 -0800 Subject: [PATCH] Rearranged initial fetch of speed data --- start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index 1eb2d37..ebd49a6 100644 --- a/start.sh +++ b/start.sh @@ -16,10 +16,6 @@ touch /var/www/data/speed/raw.speedtest.json chown -R root:root /var/www/data || true chmod -R a+rwX /var/www/data || true -# Run the initial speed test once (in background) to populate files if possible -# We run it in background so server starts promptly. The cron will run hourly. -/usr/local/bin/run_speed_test.sh >> /var/log/cron.log 2>&1 || true & - # Ensure the cron job exists in Cron CRON_FILE=/etc/cron.d/speedtest-cron if [ -f ${CRON_FILE} ] && grep run_speed_test ${CRON_FILE}; then @@ -31,6 +27,10 @@ fi # Start Debian cron in background service cron start || cron || true +# Run the initial speed test once (in background) to populate files if possible +# We run it in background so server starts promptly. The cron will run hourly. +/usr/local/bin/run_speed_test.sh >> /var/log/cron.log 2>&1 || true & + # Start busybox httpd serving /var/www on configured port in foreground if command -v busybox >/dev/null 2>&1; then echo "starting busybox httpd on port ${PORT} serving /var/www"