mirror of
https://github.com/teddysun/across.git
synced 2025-01-31 12:19:35 +08:00
Fixed xl2tpd service
This commit is contained in:
parent
c96089c333
commit
86ec6e8950
6
l2tp.sh
6
l2tp.sh
@ -511,16 +511,18 @@ EOF
|
|||||||
rm -f /var/tmp/libreswan-nss-pwd
|
rm -f /var/tmp/libreswan-nss-pwd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update-rc.d xl2tpd defaults
|
update-rc.d -f xl2tpd defaults
|
||||||
|
|
||||||
cp -f /etc/rc.local /etc/rc.local.old.`date +%Y%m%d`
|
cp -f /etc/rc.local /etc/rc.local.old.`date +%Y%m%d`
|
||||||
sed --follow-symlinks -i -e '/^exit 0/d' /etc/rc.local
|
sed --follow-symlinks -i -e '/^exit 0/d' /etc/rc.local
|
||||||
cat >> /etc/rc.local <<EOF
|
cat >> /etc/rc.local <<EOF
|
||||||
|
|
||||||
# Added by L2TP VPN script
|
# Added by L2TP VPN script
|
||||||
/usr/sbin/service ipsec start
|
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
/usr/sbin/service ipsec start
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
|
chmod +x /etc/rc.local
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
|
||||||
/sbin/iptables-restore < /etc/iptables.rules
|
/sbin/iptables-restore < /etc/iptables.rules
|
||||||
|
Loading…
x
Reference in New Issue
Block a user