Rearranged initial fetch of speed data
This commit is contained in:
8
start.sh
8
start.sh
@@ -16,10 +16,6 @@ touch /var/www/data/speed/raw.speedtest.json
|
|||||||
chown -R root:root /var/www/data || true
|
chown -R root:root /var/www/data || true
|
||||||
chmod -R a+rwX /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
|
# Ensure the cron job exists in Cron
|
||||||
CRON_FILE=/etc/cron.d/speedtest-cron
|
CRON_FILE=/etc/cron.d/speedtest-cron
|
||||||
if [ -f ${CRON_FILE} ] && grep run_speed_test ${CRON_FILE}; then
|
if [ -f ${CRON_FILE} ] && grep run_speed_test ${CRON_FILE}; then
|
||||||
@@ -31,6 +27,10 @@ fi
|
|||||||
# Start Debian cron in background
|
# Start Debian cron in background
|
||||||
service cron start || cron || true
|
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
|
# Start busybox httpd serving /var/www on configured port in foreground
|
||||||
if command -v busybox >/dev/null 2>&1; then
|
if command -v busybox >/dev/null 2>&1; then
|
||||||
echo "starting busybox httpd on port ${PORT} serving /var/www"
|
echo "starting busybox httpd on port ${PORT} serving /var/www"
|
||||||
|
|||||||
Reference in New Issue
Block a user