mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-02-06 20:04:54 +01:00
Update 01-openvpn.sh
This commit is contained in:
@@ -10,10 +10,14 @@ if [ bashio::config "VPN_ENABLED" == "yes" ]; then
|
|||||||
|
|
||||||
# If there is a config file, add nopull
|
# If there is a config file, add nopull
|
||||||
if [ -n "$(ls -A /config/openvpn 2>/dev/null)" ]; then
|
if [ -n "$(ls -A /config/openvpn 2>/dev/null)" ]; then
|
||||||
if ! grep -q route-nopull /etc/openvpn/config.ovpn; then
|
for file in /config/openvpn/*; do
|
||||||
echo "... adding route-nopull to your config.ovpn"
|
if [ -f "$file" ]; then
|
||||||
sed -i "1a route-nopull" /etc/openvpn/config.ovpn
|
if ! grep -q route-nopull "$file"; then
|
||||||
fi
|
echo "... adding route-nopull to $file"
|
||||||
|
sed -i "1a route-nopull" "$file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user