mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-15 07:04:57 +00:00
Update start.sh
This commit is contained in:
parent
9370314114
commit
9d06dc44f5
@ -45,7 +45,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then
|
|||||||
/usr/bin/dos2unix "${VPN_CONFIG}" 1> /dev/null
|
/usr/bin/dos2unix "${VPN_CONFIG}" 1> /dev/null
|
||||||
|
|
||||||
# parse values from ovpn file
|
# parse values from ovpn file
|
||||||
export vpn_remote_line=$(cat "${VPN_CONFIG}" | grep -P -o -m 1 '(?<=^remote\s)[^\n\r]+' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
|
export vpn_remote_line=$(cat "${VPN_CONFIG}" | grep -E -o -m 1 '(?<=^remote\s)[^\n\r]+' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
|
||||||
if [[ ! -z "${vpn_remote_line}" ]]; then
|
if [[ ! -z "${vpn_remote_line}" ]]; then
|
||||||
echo "$(date) [info] VPN remote line defined as '${vpn_remote_line}'"
|
echo "$(date) [info] VPN remote line defined as '${vpn_remote_line}'"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user