File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed
Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ services:
7676
7777| ** Parameter** | ** Function** |
7878| :-----------:| :----------:|
79+ | ` -e CONFIG=test.conf ` | Config file name|
7980| ` -e FAIL_MODE=hard ` | Restart whole container on error|
8081| ` -e PUID=1000 ` | for UserID - see below for explanation|
8182| ` -e PGID=1000 ` | for GroupID - see below for explanation|
Original file line number Diff line number Diff line change 1010
1111config=" $( ovpn-confpath) "
1212
13- device=" $( cat $OPENVPN_DIR / $config | sed -n -re ' s/^\s* dev\s*(\w+)\s*$/\1/p ' ) "
13+ device=" $( ovpn- dev) "
1414if [ -z " $device " ]; then
1515 echo ' Interface not set'
1616 exit 1
Original file line number Diff line number Diff line change 2727config=" $( ovpn-confpath) "
2828
2929# Configured interface
30- device=" $( cat $OPENVPN_DIR / $config | sed -n -re ' s/^\s* dev\s*(\w+)\s*$/\1/p ' ) "
30+ device=" $( ovpn- dev) "
3131if [ -z " $device " ]; then
3232 echo ' Interface not set'
3333 exit 1
Original file line number Diff line number Diff line change 1+ #!/usr/bin/with-contenv bash
2+ #
3+ # Prints OpenVPN device
4+ #
5+
6+ config=$(ovpn-confpath)
7+ if [ -z "$config" ]; then
8+ exit 0
9+ fi
10+
11+ device="$(cat $OPENVPN_DIR/$config | sed -n -re 's/^\s*dev\s*(\w+)\s*$/\1/p')"
12+ echo "$device"
You can’t perform that action at this time.
0 commit comments