10 lines
162 B
Bash
Executable File
10 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
|