mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 22:04:06 +02:00
Create 01-openvpn.sh
This commit is contained in:
15
qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh
Normal file
15
qbittorrent/rootfs/etc/cont-init.d/01-openvpn.sh
Normal 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
|
||||||
Reference in New Issue
Block a user