9 lines
162 B
Bash
Executable file
9 lines
162 B
Bash
Executable file
#!/bin/sh
|
|
|
|
connection=$(pgrep -a openvpn$ | head -n 1 | awk '{print $NF }' | cut -d '.' -f 1)
|
|
|
|
if [ -n "$connection" ]; then
|
|
echo "On"
|
|
else
|
|
echo "Off"
|
|
fi
|