moved up restart a bit

This commit is contained in:
Roy 2024-02-13 18:41:47 -08:00 committed by GitHub
parent ae65c04811
commit 7ac0d2aeb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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