commit aa991e46e7fea267d165478ff933ef4b704f65b1 Author: aidan Date: Sun Feb 23 23:26:52 2025 -0500 init diff --git a/apu.sh b/apu.sh new file mode 100644 index 0000000..174ee06 --- /dev/null +++ b/apu.sh @@ -0,0 +1,2 @@ +sudo prime-select intel +sudo systemctl restart gdm3 diff --git a/checkVPN.sh b/checkVPN.sh new file mode 100644 index 0000000..a75f3ee --- /dev/null +++ b/checkVPN.sh @@ -0,0 +1,13 @@ +# Script checks if openvpn connection is alive by curling from VPN server host with 3 sec timeout +#!/bin/bash + +# Check if VPN connection established +curl 10.8.0.1 -m 3 + +# Check the exit status +if [ $? -eq 0 ]; then + echo "Connection is alive" +else + sudo systemctl restart openvpn@client + echo "VPN Connection reset$?." +fi diff --git a/gpu.sh b/gpu.sh new file mode 100644 index 0000000..a5e27ef --- /dev/null +++ b/gpu.sh @@ -0,0 +1,2 @@ +sudo prime-select nvidia +sudo systemctl restart gdm3 diff --git a/gpu_state b/gpu_state new file mode 100644 index 0000000..229e21e --- /dev/null +++ b/gpu_state @@ -0,0 +1 @@ +cat /sys/bus/pci/devices/0000:01:00.0/power_state diff --git a/kill-gpu-processes b/kill-gpu-processes new file mode 100644 index 0000000..53d3736 --- /dev/null +++ b/kill-gpu-processes @@ -0,0 +1,2 @@ +# Kill all processes running on any nvidia gpu on the system +kill $(nvidia-smi | awk '$5=="PID" {p=1} p {print $5}')