From 1f4e03436c2044270d12f85eac24f87a5975f7b4 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Fri, 9 Feb 2024 03:37:41 -0800 Subject: [PATCH] forgot to uncomment at the end of the script this whole time --- NonSteamLaunchers.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) 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