10 lines
162 B
Bash
10 lines
162 B
Bash
|
#!/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
|