#!/usr/bin/env bash # IMAGE=${1:-"docker.local/speedtest:20210528"} HEADER="#[SPEEDTEST] On certains speedtest server the packet_loss is not displayed so let's define the usage of the following SFR server: #[SPEEDTEST] - url='http://speedtest.mire.sfr.net:8080/speedtest/upload.php' lat='48.8742' lon='2.3470' name='Paris' country='France' cc='FR' sponsor='SFR' id='12746' host='speedtest.mire.sfr.net:8080'" echo "Setting the Crontab in place" (CRONTAB_NOHEADER=Y crontab -l | egrep -v -- '--name connectivity_test|SPEEDTEST|INFLUXDB' ; echo "${HEADER}"; echo "*/5 * * * * /usr/bin/podman pod inspect speedtest 2>&1 > /dev/null && /usr/bin/podman run --env INFLUXDB* --tty --name connectivity_test --replace --rm --pod speedtest ${IMAGE} 2>&1 > /dev/null") | crontab -