diff --git a/vpnupgrade_Libreswan.sh b/vpnupgrade_Libreswan.sh index 512fa30..e449c52 100644 --- a/vpnupgrade_Libreswan.sh +++ b/vpnupgrade_Libreswan.sh @@ -28,7 +28,7 @@ if [ "$(id -u)" != 0 ]; then exit 1 fi -ipsec --version 2>/dev/null | grep -qs "Libreswan" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan" if [ "$?" != "0" ]; then echo "This upgrade script requires that you already have Libreswan installed." echo "Aborting." @@ -37,7 +37,7 @@ fi clear -ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" if [ "$?" = "0" ]; then echo "You already have Libreswan ${SWAN_VER} installed! " echo @@ -100,7 +100,7 @@ tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE" cd "libreswan-${SWAN_VER}" || { echo "Failed to enter Libreswan source directory. Aborting."; exit 1; } make programs && make install -ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" if [ "$?" != "0" ]; then echo echo "Sorry, something went wrong." diff --git a/vpnupgrade_Libreswan_centos.sh b/vpnupgrade_Libreswan_centos.sh index 0d7225c..7b9af58 100644 --- a/vpnupgrade_Libreswan_centos.sh +++ b/vpnupgrade_Libreswan_centos.sh @@ -33,7 +33,7 @@ if [ "$(id -u)" != 0 ]; then exit 1 fi -ipsec --version 2>/dev/null | grep -qs "Libreswan" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan" if [ "$?" != "0" ]; then echo "This upgrade script requires that you already have Libreswan installed." echo "Aborting." @@ -42,7 +42,7 @@ fi clear -ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" if [ "$?" = "0" ]; then echo "You already have Libreswan ${SWAN_VER} installed! " echo @@ -130,7 +130,7 @@ tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE" cd "libreswan-${SWAN_VER}" || { echo "Failed to enter Libreswan source directory. Aborting."; exit 1; } make programs && make install -ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" if [ "$?" != "0" ]; then echo echo "Sorry, something went wrong."