mirror of
https://github.com/teddysun/across.git
synced 2025-01-31 12:19:35 +08:00
Fixed xl2tpd invalid service
This commit is contained in:
parent
cbc45385a5
commit
582d43afbc
13
l2tp.sh
13
l2tp.sh
@ -670,8 +670,16 @@ EOF
|
|||||||
</service>
|
</service>
|
||||||
EOF
|
EOF
|
||||||
chmod 640 /usr/lib/firewalld/services/xl2tpd.xml
|
chmod 640 /usr/lib/firewalld/services/xl2tpd.xml
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
systemctl enable ipsec
|
||||||
|
systemctl enable xl2tpd
|
||||||
|
systemctl enable firewalld
|
||||||
|
|
||||||
systemctl status firewalld > /dev/null 2>&1
|
systemctl status firewalld > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
|
echo "confirm firewalld status..."
|
||||||
|
firewall-cmd --list-all
|
||||||
firewall-cmd --permanent --add-service=ipsec
|
firewall-cmd --permanent --add-service=ipsec
|
||||||
firewall-cmd --permanent --add-service=xl2tpd
|
firewall-cmd --permanent --add-service=xl2tpd
|
||||||
firewall-cmd --permanent --add-masquerade
|
firewall-cmd --permanent --add-masquerade
|
||||||
@ -681,6 +689,8 @@ EOF
|
|||||||
systemctl start firewalld
|
systemctl start firewalld
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
echo "Firewalld start success..."
|
echo "Firewalld start success..."
|
||||||
|
echo "confirm firewalld status..."
|
||||||
|
firewall-cmd --list-all
|
||||||
firewall-cmd --permanent --add-service=ipsec
|
firewall-cmd --permanent --add-service=ipsec
|
||||||
firewall-cmd --permanent --add-service=xl2tpd
|
firewall-cmd --permanent --add-service=xl2tpd
|
||||||
firewall-cmd --permanent --add-masquerade
|
firewall-cmd --permanent --add-masquerade
|
||||||
@ -690,9 +700,6 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl enable ipsec
|
|
||||||
systemctl enable xl2tpd
|
|
||||||
systemctl enable firewalld
|
|
||||||
systemctl restart ipsec
|
systemctl restart ipsec
|
||||||
systemctl restart xl2tpd
|
systemctl restart xl2tpd
|
||||||
echo "confirm ipsec status..."
|
echo "confirm ipsec status..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user