From 7ac0d2aeb2bfb7aa7b9981d3cf8f52d18e5fabe0 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Tue, 13 Feb 2024 18:41:47 -0800 Subject: [PATCH] moved up restart a bit --- NonSteamLaunchers.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index cac1fef..df6dbf4 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -2722,7 +2722,16 @@ fi +# Detach script from Steam process +nohup sh -c 'sleep 10; /usr/bin/steam' & +# Close all instances of Steam +steam_pid() { pgrep -x steam ; } +steam_running=$(steam_pid) +[[ -n "$steam_running" ]] && killall steam + +# Wait for the steam process to exit +while steam_pid > /dev/null; do sleep 5; done @@ -2759,16 +2768,7 @@ python3 $python_script_path -# Detach script from Steam process -nohup sh -c 'sleep 10; /usr/bin/steam' & -# Close all instances of Steam -steam_pid() { pgrep -x steam ; } -steam_running=$(steam_pid) -[[ -n "$steam_running" ]] && killall steam - -# Wait for the steam process to exit -while steam_pid > /dev/null; do sleep 5; done # TODO: might be better to relocate temp files to `/tmp` or even use `mktemp -d` since `rm -rf` is potentially dangerous without the `-i` flag