From 3b31b9c94c611aa9427bbc73237eadf990acbe3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 25 Aug 2023 08:59:00 +0300 Subject: [PATCH] Make image pull fail gracefully on door controllers --- ansible-doors.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible-doors.yml b/ansible-doors.yml index c641cb0..45ba980 100644 --- a/ansible-doors.yml +++ b/ansible-doors.yml @@ -22,7 +22,7 @@ ExecStartPre=-ctr task kill --signal=9 %p_%i ExecStartPre=-ctr task rm %p_%i ExecStartPre=-ctr c rm %p_%i - ExecStartPre=ctr image pull $IMAGE + ExecStartPre=-ctr image pull $IMAGE ExecStart=ctr run --tty -d --rm --pid-file=/run/%i.pid --privileged --read-only --net-host $IMAGE %p_%i /usr/local/bin/mjpg_streamer -i 'input_uvc.so -d /dev/%I -r 1280x720 -f 10' -o 'output_http.so -w /usr/share/mjpg_streamer/www' ExecStopPost=ctr task rm %p_%i ExecStopPost=ctr c rm %p_%i @@ -47,7 +47,7 @@ ExecStartPre=-ctr task kill --signal=9 %N ExecStartPre=-ctr task rm %N ExecStartPre=-ctr c rm %N - ExecStartPre=ctr image pull $IMAGE + ExecStartPre=-ctr image pull $IMAGE ExecStart=ctr run --rm --pid-file=/run/%N.pid --privileged --read-only --env-file=/etc/godoor --env=KDOORPI_API_ALLOWED=https://doorboy-proxy.k-space.ee/allowed --env=KDOORPI_API_LONGPOLL=https://doorboy-proxy.k-space.ee/longpoll --env=KDOORPI_API_SWIPE=https://doorboy-proxy.k-space.ee/swipe --env=KDOORPI_DOOR=%H --net-host --net-host --cwd /app $IMAGE %N /godoor ExecStopPost=ctr task rm %N ExecStopPost=ctr c rm %N