Create 01-openvpn.sh

This commit is contained in:
Alexandre
2023-12-11 16:17:18 +01:00
committed by GitHub
parent b69345e5ae
commit 47154ee096

View File

@@ -0,0 +1,15 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
mkdir -p /config/openvpn
if [ -d /config/openvpn ]; then
if [ -n "$(ls -A /config/openvpn 2>/dev/null)" ]; then
# Modify ovpn config
if ! grep -q route-nopull /etc/openvpn/config.ovpn; then
echo "... adding route-nopull to your config.ovpn"
sed -i "1a route-nopull" /etc/openvpn/config.ovpn
fi
fi
fi