diff --git a/extras/vpnupgrade_Libreswan.sh b/extras/vpnupgrade_Libreswan.sh index 9c50c6e..15e427e 100644 --- a/extras/vpnupgrade_Libreswan.sh +++ b/extras/vpnupgrade_Libreswan.sh @@ -124,6 +124,9 @@ wget -t 3 -T 30 -nv -O "$swan_file" "$swan_url1" || wget -t 3 -T 30 -nv -O "$swa tar xzf "$swan_file" && /bin/rm -f "$swan_file" cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; } echo "WERROR_CFLAGS =" > Makefile.inc.local +if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then + apt-get -yq install libsystemd-dev +fi make -s programs && make -s install # Verify the install and clean up diff --git a/extras/vpnupgrade_Libreswan_centos.sh b/extras/vpnupgrade_Libreswan_centos.sh index d8ecfc3..ef85a93 100644 --- a/extras/vpnupgrade_Libreswan_centos.sh +++ b/extras/vpnupgrade_Libreswan_centos.sh @@ -111,12 +111,12 @@ yum -y install nss-devel nspr-devel pkgconfig pam-devel \ curl-devel flex bison gcc make \ fipscheck-devel unbound-devel xmlto -# Installed Libevent2 +# Install libevent2 and systemd-devel (CentOS 7) if grep -qs "release 6" /etc/redhat-release; then yum -y remove libevent-devel yum -y install libevent2-devel elif grep -qs "release 7" /etc/redhat-release; then - yum -y install libevent-devel + yum -y install libevent-devel systemd-devel fi # Compile and install Libreswan diff --git a/vpnsetup.sh b/vpnsetup.sh index 3cbc6c8..5d84970 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -166,6 +166,9 @@ wget -t 3 -T 30 -nv -O "$swan_file" "$swan_url1" || wget -t 3 -T 30 -nv -O "$swa tar xzf "$swan_file" && /bin/rm -f "$swan_file" cd "libreswan-$swan_ver" || { echoerr "Cannot enter Libreswan source dir. Aborting."; exit 1; } echo "WERROR_CFLAGS =" > Makefile.inc.local +if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then + apt-get -yq install libsystemd-dev +fi make -s programs && make -s install # Verify the install and clean up diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 2dfb43c..2757c3f 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -147,12 +147,12 @@ yum -y install ppp xl2tpd # Install Fail2Ban to protect SSH yum -y install fail2ban -# Installed Libevent2 +# Install libevent2 and systemd-devel (CentOS 7) if grep -qs "release 6" /etc/redhat-release; then yum -y remove libevent-devel yum -y install libevent2-devel elif grep -qs "release 7" /etc/redhat-release; then - yum -y install libevent-devel + yum -y install libevent-devel systemd-devel fi # Compile and install Libreswan