From 8e514a5f74ea4a8a936d3e605cfa21edb383d860 Mon Sep 17 00:00:00 2001 From: Orazio Date: Sat, 6 Jun 2020 15:39:37 +0200 Subject: [PATCH] Update EasyRSA and unattended upgrades config - EasyRSA 3.0.6 -> 3.0.7 - Unattended upgrades config 1.16 -> 2.4 --- auto_install/install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 93b266f..be43e70 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -48,11 +48,11 @@ BASE_DEPS=(git tar wget curl grep dnsutils whiptail net-tools bsdmainutils) INSTALLED_PACKAGES=() ######## URLs ######## -easyrsaVer="3.0.6" -easyrsaRel="https://github.com/OpenVPN/easy-rsa/releases/download/v${easyrsaVer}/EasyRSA-unix-v${easyrsaVer}.tgz" +easyrsaVer="3.0.7" +easyrsaRel="https://github.com/OpenVPN/easy-rsa/releases/download/v${easyrsaVer}/EasyRSA-${easyrsaVer}.tgz" # Raspbian's unattended-upgrades package downloads Debian's config, so this is the link for the proper config -UNATTUPG_RELEASE="1.16" +UNATTUPG_RELEASE="2.4" UNATTUPG_CONFIG="https://github.com/mvo5/unattended-upgrades/archive/${UNATTUPG_RELEASE}.tar.gz" # Fallback url for the OpenVPN key @@ -1811,8 +1811,12 @@ confOpenVPN(){ fi # Get easy-rsa - wget -qO- "${easyrsaRel}" | $SUDO tar xz --directory /etc/openvpn - $SUDO mv /etc/openvpn/EasyRSA-v${easyrsaVer} /etc/openvpn/easy-rsa + wget -qO- "${easyrsaRel}" | $SUDO tar xz --one-top-level=/etc/openvpn/easy-rsa --strip-components 1 + if ! test -s /etc/openvpn/easy-rsa/easyrsa; then + echo "$0: ERR: Failed to download EasyRSA." + exit 1 + fi + # fix ownership $SUDO chown -R root:root /etc/openvpn/easy-rsa $SUDO mkdir /etc/openvpn/easy-rsa/pki