Merge TomatoVPN 1.22vpn2.0005
[tomato.git] / README
bloba03ec858e5406435c0300bf3cc5698e555f2846b
1 README for SgtPepperKSU VPN build of Tomato Firmware\r
2 \r
3 In order to compile, please start with a Tomato Firware source tree.  Then simply run:\r
4 bunzip2 < patch_file.patch.bz2 | patch -p1\r
5 substituting 'patch_file.patch.bz2' with the file name of the compressed patch file provided.  That's it! You're ready to compile.\r
6 If you plan to redistribute, be sure to read the COPYING file.\r
7 \r
8 To have your VPN start automatically when the router is rebooted, add "service vpnserver1 start" (no quotes, replacing server with\r
9 client and 2 for 1 if appropriate) to your init script.  You will probably also need to add a delay before it with "sleep 10" (you\r
10 can test to see if a shorter or longer delay is needed).\r
12 The have the router periodically check if the VPN is running and restart it if it has stopped, add the following to your init\r
13 script (replacing server, 1, */30, or sleep 10 as appropriate):\r
14 ## Start VPN init script\r
15 #Generate vpnup.sh\r
16 echo "#!/bin/sh\r
17 killall -0 vpn\$1 2> /dev/null\r
18 if [ \$? != 0 ]\r
19 then\r
20 logger \"\$0: Starting vpn\$1\"\r
21 service vpn\$1 start\r
22 else\r
23 logger \"\$0: vpn\$1 already running: \$(pidof vpn\$1)\"\r
24 fi\r
25 " > /tmp/vpnup.sh\r
26 # Make vpnup.sh executable\r
27 chmod +x /tmp/vpnup.sh\r
28 # Schedule vpnup.sh to run every 30 minutes\r
29 cru a CheckVPNServer "*/30 * * * * /tmp/vpnup.sh server1"\r
30 # Wait 10 seconds and run vpnup.sh once\r
31 sleep 10\r
32 /tmp/vpnup.sh server1\r
33 ## End VPN init script\r
36 If you have any questions/comments/concerns, contact me at tomatovpn@keithmoyer.com\r
38 Enjoy!\r