From 63213ca4b62245b752d05ecb25d957f983c986f0 Mon Sep 17 00:00:00 2001 From: alienatedsec <73167064+alienatedsec@users.noreply.github.com> Date: Sat, 16 Sep 2023 23:01:20 +0100 Subject: [PATCH] [Change] launch.sh optimised to kill gently Changes to be committed: modified: src/static/static/home/yi-hack-v5/script/launch.sh --- .../static/home/yi-hack-v5/script/launch.sh | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/static/static/home/yi-hack-v5/script/launch.sh b/src/static/static/home/yi-hack-v5/script/launch.sh index c267b0f..193d00c 100755 --- a/src/static/static/home/yi-hack-v5/script/launch.sh +++ b/src/static/static/home/yi-hack-v5/script/launch.sh @@ -1,3 +1,6 @@ +#!/bin/sh +# +# 0.4.1b # # This file is part of yi-hack-v5 (https://github.com/alienatedsec/yi-hack-v5). # Copyright (c) 2021-2023 alienatedsec - v5 specific @@ -14,19 +17,23 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Launch - version 0.3.8 -# -#!/bin/sh + kill_all() { - # Kills all running instances of app1 and app2 - killall wd_rtsp.sh - killall rRTSPServer - killall h264grabber + # Kills all running instances + killall -s SIGTERM wd_rtsp.sh + killall -s SIGTERM rRTSPServer + killall -s SIGTERM h264grabber + + sleep 10 + + killall -s SIGKILL wd_rtsp.sh + killall -s SIGKILL rRTSPServer + killall -s SIGKILL h264grabber } launch_apps() { - # Launches app1 and app2 with different commands + # Launches apps with different commands if [ "$execute_audio" = true ]; then h264grabber -r audio -m "$model" -f & fi @@ -62,7 +69,7 @@ launch_apps() { } -# Read model name from file +# Read model and versions from files model=$(cat /home/app/.camver) version_cam=$(cat /home/yi-hack-v5/version) version_sd=$(cat /tmp/sd/yi-hack-v5/version)