Reduce some of the excessive sleep times for various things

This commit is contained in:
Josh.5
2023-09-29 23:39:26 +13:00
parent c651034d13
commit 12cc16459a
5 changed files with 7 additions and 9 deletions

View File

@@ -19,15 +19,15 @@ _term() {
while kill -0 "$sunshine_pid"; do
kill -TERM "$sunshine_pid" 2>/dev/null
counter=$((counter + 1))
[ "$counter" -gt 2 ] && break
sleep 2
[ "$counter" -gt 8 ] && break
sleep 0.5
done
counter=0
while kill -0 "$sunshine_pid"; do
kill -KILL "$sunshine_pid" 2>/dev/null
counter=$((counter + 1))
[ "$counter" -gt 2 ] && break
sleep 1
[ "$counter" -gt 4 ] && break
sleep 0.5
done
}
trap _term SIGTERM SIGINT