Skip to content

Commit

Permalink
Fix for Raspberry Pi
Browse files Browse the repository at this point in the history
- Raspberry Pis (ARM-based) may take some time on boot to initialize
  network interfaces such as Wi-Fi. Increasing the service restart
  delay in rc.local from 15 seconds to 60 seconds helps ensure that
  the VPN is enabled on these network interfaces.
  • Loading branch information
hwdsl2 committed May 20, 2023
1 parent d343401 commit 22838b7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vpnsetup_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,14 @@ EOF
else
echo '#!/bin/sh' > /etc/rc.local
fi
cat >> /etc/rc.local <<'EOF'
rc_delay=15
if uname -m | grep -qi '^arm'; then
rc_delay=60
fi
cat >> /etc/rc.local <<EOF
# Added by hwdsl2 VPN script
(sleep 15
(sleep $rc_delay
service ipsec restart
service xl2tpd restart
echo 1 > /proc/sys/net/ipv4/ip_forward)&
Expand Down

0 comments on commit 22838b7

Please sign in to comment.