From 820c95431913d8f761523cd9a2ccf837c106ceb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 21 Aug 2023 10:38:52 +0300 Subject: [PATCH] Update mjpg-streamer service --- ansible-doors.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ansible-doors.yml b/ansible-doors.yml index 41d6893..5b49a78 100644 --- a/ansible-doors.yml +++ b/ansible-doors.yml @@ -16,10 +16,20 @@ After=network.target ConditionPathExists=/dev/%I [Service] - ExecStart=ctr run --rm --privileged --read-only --net-host harbor.k-space.ee/k-space/mjpg-streamer:latest mjpg-streamer /usr/local/bin/mjpg_streamer -i 'input_uvc.so -d /dev/%I' -o 'output_http.so -w /usr/share/mjpg_streamer/www' + Environment=IMAGE=harbor.k-space.ee/k-space/mjpg-streamer:latest + StandardOutput=tty + Type=forking + 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 + 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 + PIDFile=/run/%i.pid [Install] WantedBy=multi-user.target - - name: Enable Doorboy controller + - name: Enable mjpg-streamer ansible.builtin.systemd: state: restarted daemon_reload: yes