From 3948ef66742ccb9afb762f7e75ff7d4c08bf81cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Thu, 11 Apr 2024 19:09:15 +0200 Subject: [PATCH] Quit the camera --- startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index 674a969..c819143 100644 --- a/startup.sh +++ b/startup.sh @@ -62,7 +62,6 @@ echo "Tirette pid" $pid > /home/modelec/Serge/Tirette_pid.txt pids+=($pid) sleep 1 - # Fonction pour surveiller la fermeture de l'IHM monitor_all() { while true; do @@ -72,7 +71,8 @@ monitor_all() { echo "Program with PID $pid has terminated, stopping other programs" for other_pid in "${pids[@]}"; do if [ "$other_pid" != "$pid" ]; then - if ps -p $other_pid -o comm= | grep -q "socketServer"; then + if ps -p $other_pid -o comm= | grep -q "camera"; then + screen -S camera -X quit continue fi kill -SIGKILL $other_pid 2>/dev/null