BuildTools 1 year ago
parent
commit
d12494a9dc
1 changed files with 18 additions and 0 deletions
  1. 18 0
      update_cuda.sh

+ 18 - 0
update_cuda.sh

@@ -1,4 +1,14 @@
 #!/bin/bash
 #!/bin/bash
+foxy=$(systemctl show -p ActiveState foxypool.service | sed 's/ActiveState=//g')
+if [ $foxy = "active" ]
+then
+echo "FoxyPool is enabled and running"
+echo "Disable FoxyPool (needed for update cuda)"
+sudo systemctl stop foxypool.service
+sudo systemctl disable foxypool.service
+touch .foxy
+fi
+
 if [ ! -f /home/wareck/.cuda_install ]
 if [ ! -f /home/wareck/.cuda_install ]
 then
 then
 if [ ! -f cuda_12.3.2_545.23.08_linux.run ]
 if [ ! -f cuda_12.3.2_545.23.08_linux.run ]
@@ -14,3 +24,11 @@ echo "Updating ..."
 sudo rm /tmp/.X1-lock
 sudo rm /tmp/.X1-lock
 sudo ./cuda_12.3.2_545.23.08_linux.run --silent --driver
 sudo ./cuda_12.3.2_545.23.08_linux.run --silent --driver
 sudo rm /home/wareck/.cuda_install
 sudo rm /home/wareck/.cuda_install
+
+if [ -f .foxy ]
+then
+echo "Re-enable FoxyPool:"
+sudo systemctl start foxypool.service
+sudo systemctl enable foxypool.service
+fi
+echo "Done."