1
0
mirror of synced 2025-02-16 12:03:15 +03:00
- Fix commit ca84aa7 to avoid a possible race condition
  when starting ipsec and xl2tpd services on boot
This commit is contained in:
hwdsl2 2017-01-06 00:51:59 -06:00
parent ca84aa7a13
commit 9500da3231
2 changed files with 5 additions and 6 deletions

View File

@ -401,8 +401,8 @@ if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then
cat >> /etc/rc.local <<'EOF'
# Added by hwdsl2 VPN script
service ipsec restart
service xl2tpd restart
service ipsec start
service xl2tpd start
echo 1 > /proc/sys/net/ipv4/ip_forward
exit 0
EOF

View File

@ -371,13 +371,12 @@ fi
# Start services at boot
if grep -qs "release 6" /etc/redhat-release; then
for svc in iptables fail2ban ipsec xl2tpd; do
chkconfig "$svc" on
done
chkconfig iptables on
chkconfig fail2ban on
else
systemctl --now mask firewalld
yum -y install iptables-services || exiterr2
systemctl enable iptables fail2ban ipsec xl2tpd >/dev/null 2>&1
systemctl enable iptables fail2ban >/dev/null 2>&1
fi
if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then
if [ -f /etc/rc.local ]; then