sh OpenConnect 7的Autobuild脚本(Ubuntu 14/15/16 trusty / vivid / xenial)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh OpenConnect 7的Autobuild脚本(Ubuntu 14/15/16 trusty / vivid / xenial)相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env bash

oc_ver="7.08"

echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
sudo -k
sudo -v

## Preflight
sudo apt-get install curl vpnc-scripts build-essential gettext pkg-config libssl-dev libxml2-dev liblz4-dev libstoken1 stoken
curl -O ftp://ftp.infradead.org/pub/openconnect/openconnect-${oc_ver}.tar.gz
curl -O ftp://ftp.infradead.org/pub/openconnect/openconnect-${oc_ver}.tar.gz.asc
gpg --keyserver pgp.mit.edu --recv-key 67e2f359

if gpg --verify openconnect-${oc_ver}.tar.gz.asc 2>/dev/null 
then
  echo -e "\n++++ GPG Signature Verified OK! ++++\n\n"
else
  gpg --verify openconnect-${oc_ver}.tar.gz.asc  # to show output
  echo -e "\n!!!! GPG Signature FAILED. Not proceeding with autobuild !!!!\n\n"
  exit 127
fi

tar xzf openconnect-${oc_ver}.tar.gz
cd openconnect-${oc_ver}

if ! (./configure --without-gnutls --with-vpnc-script=/usr/share/vpnc-scripts/vpnc-script)
then
  echo "!! Configuration was not successful, not proceeding with autobuild"
  exit 1
fi

if ! (make)
then
  echo "!! build was not successful, not proceeding with install"
  exit 2
fi

if ! (sudo make install)
then
  echo "!! installation failed"
  exit 3
fi

if ! (sudo ldconfig /usr/local/lib)
then
  echo "?? error running ldconfig; this MAY be a problem"
  echo "   but we will not exit with an error for it"
fi

exit 0
  

以上是关于sh OpenConnect 7的Autobuild脚本(Ubuntu 14/15/16 trusty / vivid / xenial)的主要内容,如果未能解决你的问题,请参考以下文章

sh 适用于OpenConnect的Cisco Anyconnect CSD包装器。

sh 适用于OpenConnect的Cisco Anyconnect CSD包装器。

openconnect怎样下发路由表?

OpenConnect 自动连接/重新连接脚本?

MacOS上使用Openconnect代替Cisco Anyconnect

如何强制“OpenConnect”客户端使用 TLS 1.0