Fix for Raspbian

- On Raspberry Pis /etc/rc.local can run early during boot
- If the network is not ready, IPsec may fail to start
- A delay has been added as a workaround. Ref: #76
This commit is contained in:
hwdsl2 2016-10-25 21:32:52 -05:00
parent 13db1d4a7f
commit 895d46c0c9

View File

@ -433,6 +433,11 @@ if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then
cat >> /etc/rc.local <<'EOF'
# Added by hwdsl2 VPN script
EOF
if grep -qs raspbian /etc/os-release; then
echo "sleep 30" >> /etc/rc.local
fi
cat >> /etc/rc.local <<'EOF'
service fail2ban restart || /bin/true
service ipsec start
service xl2tpd start