Skip to content

Commit 216d1a8

Browse files
authored
Merge pull request #5 from jlti-dev/dev
checking if routes are set
2 parents 149acb0 + f050bf8 commit 216d1a8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

start.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ $($iptab)
103103
echo "--------------------------------------------------"
104104
if [ "$FIREWALL" == "false" ]; then
105105
echo "Not doing any iptables"
106-
else
107-
echo "creating tempfile for iptables (public routes"
106+
elif [ grep "push \"route" /docker/ovpn.conf ]
107+
echo "creating tempfile for iptables (public routes)"
108108
tmp=$(mktemp)
109109
grep "push \"route" /docker/ovpn.conf >> $tmp
110110
while read -r line ; do
@@ -126,6 +126,8 @@ else
126126
iptables=$(which iptables)
127127
chmod u+s $iptables
128128
chmod +x /docker/firewall.sh
129+
else
130+
echo "no routes found in /docker/ovpn.conf"
129131
fi
130132
if [ -f "/docker/ip-routes.txt" ]; then
131133
echo "--------------------------------------------------"

0 commit comments

Comments
 (0)