openvpn rework

This commit is contained in:
Anthony Axenov 2024-07-31 23:29:58 +08:00
parent efa60f5231
commit 3ef8692684
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -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}"
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
[ $? = 0 ] && {
echo
echo "Finish!"
success "openvpn installed!"
openvpn --version
echo
}