From 3ef86926844dcc162b78f18e47db31a3cf8f25cf Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Wed, 31 Jul 2024 23:29:58 +0800 Subject: [PATCH] openvpn rework --- install/openvpn | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/install/openvpn b/install/openvpn index c392197..f52a536 100755 --- a/install/openvpn +++ b/install/openvpn @@ -1,37 +1,31 @@ #!/bin/bash -##makedesc: Install openvpn v2.5.8 (src) +##makedesc: Install openvpn v2.6.3 (src) +source `dirname $0`/../helpers || exit 255 # https://openvpn.net/community-downloads/ # https://openvpn.net/community-resources/installing-openvpn/ -[ $1 ] && OVPNVER="$1" || OVPNVER='2.5.8' +[ "$1" ] && OVPNVER="$1" || OVPNVER='2.6.3' -echo -echo "===============================================" -echo "Installing openvpn v${OVPNVER} (src)..." -echo "===============================================" -echo +title "Installing openvpn v${OVPNVER} (src)..." -set -ex - -sudo apt install -y \ - libssl-dev \ +require libssl-dev \ liblzo2-dev \ libpam0g-dev -mkdir -p "${HOME}/install/" -wget "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" \ - -O "/tmp/openvpn-${OVPNVER}.tar.gz" -tar -xzf "/tmp/openvpn-${OVPNVER}.tar.gz" -C "${HOME}/install/" -cd "${HOME}/install/openvpn-${OVPNVER}" -sudo ./configure && \ +mkdir -p "$HOME/install/" +download "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" "$HOME/install/openvpn-${OVPNVER}.tar.gz" && \ + unpak_targz "$HOME/install/openvpn-${OVPNVER}.tar.gz" "$HOME/install/" && \ + cd "$HOME/install/openvpn-${OVPNVER}" && \ + sudo ./configure && \ sudo make && \ sudo make install && - sudo apt install -y \ - network-manager-openvpn \ + apt_install network-manager-openvpn \ network-manager-openvpn-gnome -echo -echo "Finish!" -openvpn --version -echo +[ $? = 0 ] && { + echo + success "openvpn installed!" + openvpn --version + echo +}