init
This commit is contained in:
commit
aa991e46e7
13
checkVPN.sh
Normal file
13
checkVPN.sh
Normal file
@ -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
|
2
kill-gpu-processes
Normal file
2
kill-gpu-processes
Normal file
@ -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}')
|
Loading…
x
Reference in New Issue
Block a user