1
0
mirror of synced 2024-11-22 04:56:03 +03:00

Fix xl2tpd on CentOS 7 for Linode

- Fix xl2tpd on CentOS 7 for providers such as Linode,
  where kernel module "l2tp_ppp" is unavailable
- Closes: #114
This commit is contained in:
hwdsl2 2017-02-16 12:28:57 -06:00
parent 320e17a61d
commit 43d11fe35a

View File

@ -418,6 +418,15 @@ chmod 600 /etc/ipsec.secrets* /etc/ppp/chap-secrets* /etc/ipsec.d/passwd*
# Apply new IPTables rules
iptables-restore < "$IPT_FILE"
# Fix xl2tpd on CentOS 7 for providers such as Linode,
# where kernel module "l2tp_ppp" is unavailable
if grep -qs "release 7" /etc/redhat-release; then
if ! modprobe -q l2tp_ppp; then
sed -i '/ExecStartPre/s/^/#/' /usr/lib/systemd/system/xl2tpd.service
systemctl daemon-reload
fi
fi
# Restart services
modprobe -q pppol2tp
mkdir -p /var/run/fail2ban