Skip to content
This repository has been archived by the owner on Sep 16, 2018. It is now read-only.

Commit

Permalink
Merge pull request #52 from kongjian/master
Browse files Browse the repository at this point in the history
Upgrade to Libreswan 3.17
  • Loading branch information
kitten committed Dec 9, 2017
2 parents 27c7bcb + 9365614 commit 1c97068
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ fi
mkdir -p /opt/src
cd /opt/src
echo "Downloading LibreSwan's source..."
wget -qO- https://download.libreswan.org/libreswan-3.15.tar.gz | tar xvz > /dev/null
cd libreswan-3.15
wget -qO- https://download.libreswan.org/libreswan-3.17.tar.gz | tar xvz > /dev/null
cd libreswan-3.17
echo "Compiling LibreSwan..."
make programs > /dev/null
echo "Installing LibreSwan..."
Expand Down
4 changes: 2 additions & 2 deletions setup_archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ fi
mkdir -p /opt/src
cd /opt/src
echo "Downloading LibreSwan's source..."
wget -qO- https://download.libreswan.org/libreswan-3.15.tar.gz | tar xvz > /dev/null
cd libreswan-3.15
wget -qO- https://download.libreswan.org/libreswan-3.17.tar.gz | tar xvz > /dev/null
cd libreswan-3.17
echo "Compiling LibreSwan..."
make programs > /dev/null
echo "Installing LibreSwan..."
Expand Down
20 changes: 10 additions & 10 deletions upgrade_libreswan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ then
exit 0
fi

ipsec --version | grep "Libreswan 3.15" > /dev/null
ipsec --version | grep "Libreswan 3.17" > /dev/null
if [ "$?" = "0" ]
then
echo "You already have LibreSwan 3.15 installed!"
echo "You already have LibreSwan 3.17 installed!"
echo "Do you wish to continue anyway?"
while true; do
read -p "" yn
Expand All @@ -29,8 +29,8 @@ then
echo ""
fi

echo "This script will build and install LibreSwan 3.15 on your server."
echo "This is intended for users who have already installed a VPN server but have LibreSwan of version < 3.15 installed."
echo "This script will build and install LibreSwan 3.17 on your server."
echo "This is intended for users who have already installed a VPN server but have LibreSwan of version < 3.17 installed."
echo "Do you wish to continue?"

while true; do
Expand All @@ -44,26 +44,26 @@ done

echo ""

echo "Updating apt-get and installing new dependencies needed to build LibreSwan 3.15..."
echo "Updating apt-get and installing new dependencies needed to build LibreSwan 3.17..."
apt-get update > /dev/null
apt-get install libevent-dev xmlto -y > /dev/null

mkdir -p /opt/src

cd /opt/src
echo "Downloading LibreSwan's source..."
wget -qO- https://download.libreswan.org/libreswan-3.15.tar.gz | tar xvz > /dev/null
cd libreswan-3.15
wget -qO- https://download.libreswan.org/libreswan-3.17.tar.gz | tar xvz > /dev/null
cd libreswan-3.17
echo "Compiling LibreSwan..."
make programs > /dev/null
echo "Installing LibreSwan..."
make install > /dev/null

ipsec --version | grep "Libreswan 3.15" > /dev/null
ipsec --version | grep "Libreswan 3.17" > /dev/null

if [ "$?" = "0" ]
then
echo "LibreSwan 3.15 was installed successfully!"
echo "LibreSwan 3.17 was installed successfully!"

# this script is for users with an existing installation, so they most probably will not have the ipsec-assist service installed.

Expand All @@ -73,7 +73,7 @@ then
exit 0
fi

echo "LibreSwan 3.15 was not installed successfully :/"
echo "LibreSwan 3.17 was not installed successfully :/"
echo "Exiting script."

exit 0

0 comments on commit 1c97068

Please sign in to comment.