From a89140edc4ca2acfd4ce31f9ccf3781bb927ccd6 Mon Sep 17 00:00:00 2001 From: geens Date: Tue, 12 Aug 2025 17:01:34 +0200 Subject: [PATCH] Better restart --- autorun.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/autorun.sh b/autorun.sh index e5e7803..f9ba2f9 100755 --- a/autorun.sh +++ b/autorun.sh @@ -1,16 +1,24 @@ #!/usr/bin/bash -git stash -git pull +while true +do + git stash + git pull -qjackctl /start-server & -JACK_PID=$! + qjackctl /start-server & + JACK_PID=$! -cargo run --release --bin audio_engine & -AUDIO_ENGINE_PID=$! + sleep 5 -cargo run --release --bin gui -- -f& -GUI_PID=$! + cargo run --release --bin audio_engine & + AUDIO_ENGINE_PID=$! -wait -n "$JACK_PID" "$AUDIO_ENGINE_PID" "$GUI_PID" -kill "$JACK_PID" "$AUDIO_ENGINE_PID" "$GUI_PID" \ No newline at end of file + cargo run --release --bin gui -- -f & + GUI_PID=$! + + wait -n $JACK_PID $AUDIO_ENGINE_PID $GUI_PID + + killall qjackctl jackd audio_engine gui cargo + + sleep 10 +done \ No newline at end of file