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 #!/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-downloads/
# https://openvpn.net/community-resources/installing-openvpn/ # https://openvpn.net/community-resources/installing-openvpn/
[ $1 ] && OVPNVER="$1" || OVPNVER='2.5.8' [ "$1" ] && OVPNVER="$1" || OVPNVER='2.6.3'
echo title "Installing openvpn v${OVPNVER} (src)..."
echo "==============================================="
echo "Installing openvpn v${OVPNVER} (src)..."
echo "==============================================="
echo
set -ex require libssl-dev \
sudo apt install -y \
libssl-dev \
liblzo2-dev \ liblzo2-dev \
libpam0g-dev libpam0g-dev
mkdir -p "${HOME}/install/" mkdir -p "$HOME/install/"
wget "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" \ download "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" "$HOME/install/openvpn-${OVPNVER}.tar.gz" && \
-O "/tmp/openvpn-${OVPNVER}.tar.gz" unpak_targz "$HOME/install/openvpn-${OVPNVER}.tar.gz" "$HOME/install/" && \
tar -xzf "/tmp/openvpn-${OVPNVER}.tar.gz" -C "${HOME}/install/" cd "$HOME/install/openvpn-${OVPNVER}" && \
cd "${HOME}/install/openvpn-${OVPNVER}" sudo ./configure && \
sudo ./configure && \
sudo make && \ sudo make && \
sudo make install && sudo make install &&
sudo apt install -y \ apt_install network-manager-openvpn \
network-manager-openvpn \
network-manager-openvpn-gnome network-manager-openvpn-gnome
echo [ $? = 0 ] && {
echo "Finish!" echo
openvpn --version success "openvpn installed!"
echo openvpn --version
echo
}