Bugfix
- Fix commit ca84aa7 to avoid a possible race condition when starting ipsec and xl2tpd services on boot
This commit is contained in:
parent
ca84aa7a13
commit
9500da3231
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user