From a8259b0120f1200df56a1c0a742a11fd51c8e54e Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 31 Jul 2016 13:51:45 +0900 Subject: [PATCH] update --- l2tp.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/l2tp.sh b/l2tp.sh index 3a0ec35..6610742 100644 --- a/l2tp.sh +++ b/l2tp.sh @@ -670,7 +670,6 @@ EOF EOF chmod 640 /usr/lib/firewalld/services/xl2tpd.xml - sleep 5 systemctl enable ipsec systemctl enable xl2tpd @@ -680,6 +679,7 @@ EOF if [ $? -eq 0 ];then echo "confirm firewalld status..." firewall-cmd --list-all + echo "add firewalld rules..." firewall-cmd --permanent --add-service=ipsec firewall-cmd --permanent --add-service=xl2tpd firewall-cmd --permanent --add-masquerade @@ -691,6 +691,7 @@ EOF echo "Firewalld start success..." echo "confirm firewalld status..." firewall-cmd --list-all + echo "add firewalld rules..." firewall-cmd --permanent --add-service=ipsec firewall-cmd --permanent --add-service=xl2tpd firewall-cmd --permanent --add-masquerade @@ -708,6 +709,11 @@ EOF systemctl -a | grep xl2tpd echo "confirm firewalld status..." firewall-cmd --list-all + firewall-cmd --list-all | grep xl2tpd > /dev/null 2>&1 + if [ $? -ne 0 ];then + firewall-cmd --permanent --add-service=xl2tpd + firewall-cmd --reload + fi }