Skip to content

Commit

Permalink
Update NonSteamLaunchers.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy authored Jul 16, 2024
1 parent 551d589 commit ca691aa
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions NonSteamLaunchers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -951,12 +951,7 @@ else

fi

# Get the command line arguments
args=("$@")

# Check if the Stop NSLGameScanner option was passed as a command line argument or clicked in the GUI
if [[ " ${args[@]} " =~ " Stop NSLGameScanner " ]] || [[ $options == "Stop NSLGameScanner" ]]; then

function stop_service {
# Stop the service
systemctl --user stop nslgamescanner.service

Expand All @@ -971,6 +966,14 @@ if [[ " ${args[@]} " =~ " Stop NSLGameScanner " ]] || [[ $options == "Stop NSLGa

# Reload the systemd user instance
systemctl --user daemon-reload
}

# Get the command line arguments
args=("$@")

# Check if the Stop NSLGameScanner option was passed as a command line argument or clicked in the GUI
if [[ " ${args[@]} " =~ " Stop NSLGameScanner " ]] || [[ $options == "Stop NSLGameScanner" ]]; then
stop_service

# If command line arguments were provided, exit the script
if [ ${#args[@]} -ne 0 ]; then
Expand All @@ -985,6 +988,7 @@ if [[ " ${args[@]} " =~ " Stop NSLGameScanner " ]] || [[ $options == "Stop NSLGa
python3 $python_script_path
else
# User does not want to run NSLGameScanner again
stop_service
exit 0
fi
fi
Expand Down

0 comments on commit ca691aa

Please sign in to comment.