From 895d46c0c9f349ea4a9bd2ea119ee0e3c92b881b Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 25 Oct 2016 21:32:52 -0500 Subject: [PATCH] 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 --- vpnsetup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vpnsetup.sh b/vpnsetup.sh index ff50003..457d4b9 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -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