diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 78e66d0..526cd59 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -2739,32 +2739,31 @@ fi # 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 # Delete NonSteamLaunchersInstallation subfolder in Downloads folder -#rm -rf "$download_dir" +rm -rf "$download_dir" #Setup NSLGameScanner.service -# Define your Python script path -#python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py" +python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py" # Define your GitHub link -#github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py" +github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py" # Check if the service is already running -#service_status=$(systemctl --user is-active nslgamescanner.service) +service_status=$(systemctl --user is-active nslgamescanner.service) -#if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ] -#then - #echo "Service is already running or activating. Stopping the service..." - #systemctl --user stop nslgamescanner.service -#fi +if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ] +then + echo "Service is already running or activating. Stopping the service..." + systemctl --user stop nslgamescanner.service +fi -#echo "Updating Python script from GitHub..." -# Download the Python script from GitHub -#curl -o $python_script_path $github_link +echo "Updating Python script from GitHub..." + +curl -o $python_script_path $github_link + +echo "Starting the service..." -#echo "Starting the service..." -# Call your Python script python3 $python_script_path