mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2026-06-13 04:04:59 +03:00
Fix formatting and improve NSLGameScanner restart logic
This commit is contained in:
@@ -2404,6 +2404,13 @@ if [[ " ${args[@]} " =~ " 🔍 " ]] || [[ $options == "🔍" ]]; then
|
|||||||
# User wants to run NSLGameScanner again
|
# User wants to run NSLGameScanner again
|
||||||
show_message "NSLGameScanner is now restarting!"
|
show_message "NSLGameScanner is now restarting!"
|
||||||
update_nsl_game_scanner
|
update_nsl_game_scanner
|
||||||
|
|
||||||
|
# Restart Steam since the scanner is being restarted
|
||||||
|
echo "Restarting Steam..."
|
||||||
|
killall steam 2>/dev/null || true
|
||||||
|
while pgrep -x steam >/dev/null; do sleep 1; done
|
||||||
|
nohup /usr/bin/steam -silent %U &>/dev/null &
|
||||||
|
|
||||||
if systemctl --user list-unit-files | grep -q "nslgamescanner.service"; then
|
if systemctl --user list-unit-files | grep -q "nslgamescanner.service"; then
|
||||||
echo "[NSL] Starting NSL Game Scanner service..."
|
echo "[NSL] Starting NSL Game Scanner service..."
|
||||||
systemctl --user start nslgamescanner.service
|
systemctl --user start nslgamescanner.service
|
||||||
@@ -2413,7 +2420,7 @@ if [[ " ${args[@]} " =~ " 🔍 " ]] || [[ $options == "🔍" ]]; then
|
|||||||
else
|
else
|
||||||
# User does not want to run NSLGameScanner again
|
# User does not want to run NSLGameScanner again
|
||||||
stop_service
|
stop_service
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Stop Scanner
|
# Stop Scanner
|
||||||
|
|||||||
Reference in New Issue
Block a user