Skip to content

Commit

Permalink
[Change] launch.sh optimised to kill gently
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   src/static/static/home/yi-hack-v5/script/launch.sh
  • Loading branch information
alienatedsec committed Sep 16, 2023
1 parent 878720f commit 63213ca
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions 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
Expand All @@ -14,19 +17,23 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# 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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 63213ca

Please sign in to comment.