Created
August 20, 2016 13:24
-
-
Save hex128/8835691c36fc299e63be85ed09bec408 to your computer and use it in GitHub Desktop.
PPTP route configuration script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RELEVANT=remote | |
LOG=/dev/null | |
ROUTE=192.0.2.0/24 | |
echo "$0 $@" >> ${LOG} | |
address=$4 | |
gateway=$5 | |
ipparam=$6 | |
if [ ${ipparam} != ${RELEVANT} ]; then | |
echo "ipparam \"${ipparam}\" != \"${RELEVANT}\", ignoring" >> ${LOG} | |
exit | |
fi | |
echo "adding routes" >> ${LOG} | |
ip route add ${ROUTE} via ${address} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment