Skip to content

Commit dec5ee5

Browse files
committed
Added CONFIG env
1 parent 1c924bd commit dec5ee5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

root/usr/local/bin/ovpn-confpath

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@
33
# Prints OpenVPN config name
44
#
55

6+
# env CONFIG
7+
if [ -n "$CONFIG" ] && [ -f "$OPENVPN_DIR/$CONFIG" ]; then
8+
echo "$CONFIG"
9+
exit 0
10+
fi
11+
612
# Check default openvpn.conf
713
if [ -f "$OPENVPN_DIR/openvpn.conf" ]; then
8-
echo 'openvpn.conf'
14+
echo "openvpn.conf"
915
exit 0
1016
fi
1117

1218
for file in $OPENVPN_DIR/*.ovpn
1319
do
1420
[ -f "$file" ] || continue
15-
echo $(basename $file)
21+
echo "$(basename $file)"
1622
exit 0
1723
done

0 commit comments

Comments
 (0)