From 59f817575c6cd9c381a7d707b1b6ed7eec2a323b Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sun, 10 Jun 2018 16:08:12 -0500 Subject: [PATCH] Create rundir - Create /run/pluto which is used as rundir in Libreswan 3.22 and newer - Fixes #407 --- extras/vpnupgrade.sh | 1 + extras/vpnupgrade_centos.sh | 1 + vpnsetup.sh | 1 + vpnsetup_centos.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index f92d4fa2d1..4adcb3df61 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -183,6 +183,7 @@ sed -i".old-$(date +%F-%T)" \ -e "s/^[[:space:]]\+phase2alg=.\+\$/$PHASE2_NEW/" /etc/ipsec.conf # Restart IPsec service +mkdir -p /run/pluto service ipsec restart echo diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index a40a42530a..9f9fdb266d 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -184,6 +184,7 @@ sed -i".old-$(date +%F-%T)" \ -e "s/^[[:space:]]\+phase2alg=.\+\$/$PHASE2_NEW/" /etc/ipsec.conf # Restart IPsec service +mkdir -p /run/pluto service ipsec restart echo diff --git a/vpnsetup.sh b/vpnsetup.sh index b101599839..45b9f2c96b 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -475,6 +475,7 @@ chmod 600 /etc/ipsec.secrets* /etc/ppp/chap-secrets* /etc/ipsec.d/passwd* iptables-restore < "$IPT_FILE" # Restart services +mkdir -p /run/pluto service fail2ban restart 2>/dev/null service ipsec restart 2>/dev/null service xl2tpd restart 2>/dev/null diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 29863ac909..678b11ebe7 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -469,6 +469,7 @@ if grep -qs "release 7" /etc/redhat-release; then fi # Restart services +mkdir -p /run/pluto modprobe -q pppol2tp service fail2ban restart 2>/dev/null service ipsec restart 2>/dev/null