Kaynağa Gözat

fix(crontab): Update accordingly with new podman-compose

STATE:
The current version of podman-compose (v1.0.4) changes the way the pod
name (add a 'pod_' suffixe) and define a network by application

FIX:
- Change the pod name
- Add the network name

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO 2 yıl önce
ebeveyn
işleme
8fc1462408
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      scripts/crontab.sh

+ 3 - 2
scripts/crontab.sh

@@ -1,8 +1,9 @@
 #!/usr/bin/env bash
 #
-IMAGE=${1:-"docker.local/speedtest:20210528"}
+IMAGE=${1:-"docker.local/speedtest:20211029"}
+PODNAME="pod_speedtest"
 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 -
+(CRONTAB_NOHEADER=Y crontab -l | egrep -v -- '--name connectivity_test|SPEEDTEST|INFLUXDB' ; echo "${HEADER}"; echo "*/5 * * * * /usr/bin/podman pod inspect ${PODNAME} 2>&1 > /dev/null && /usr/bin/podman run --env INFLUXDB* --tty=true --interactive --name=connectivity_test --replace --rm --network=speedtest --pod=${PODNAME} ${IMAGE} 2>&1 > /dev/null") | crontab -