mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 03:40:17 +00:00
Automatically fetch latest WireGuard snapshot
This commit is contained in:
parent
d7ebb4cca9
commit
8ab71601ff
2 changed files with 6 additions and 5 deletions
|
@ -37,9 +37,6 @@ easyrsaRel="https://github.com/OpenVPN/easy-rsa/releases/download/v${easyrsaVer}
|
||||||
UNATTUPG_RELEASE="1.14"
|
UNATTUPG_RELEASE="1.14"
|
||||||
UNATTUPG_CONFIG="https://github.com/mvo5/unattended-upgrades/archive/${UNATTUPG_RELEASE}.tar.gz"
|
UNATTUPG_CONFIG="https://github.com/mvo5/unattended-upgrades/archive/${UNATTUPG_RELEASE}.tar.gz"
|
||||||
|
|
||||||
WG_SNAPSHOT="0.0.20191012"
|
|
||||||
WG_SOURCE="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${WG_SNAPSHOT}.tar.xz"
|
|
||||||
|
|
||||||
# Find the rows and columns. Will default to 80x24 if it can not be detected.
|
# Find the rows and columns. Will default to 80x24 if it can not be detected.
|
||||||
screen_size=$(stty size 2>/dev/null || echo 24 80)
|
screen_size=$(stty size 2>/dev/null || echo 24 80)
|
||||||
rows=$(echo $screen_size | awk '{print $1}')
|
rows=$(echo $screen_size | awk '{print $1}')
|
||||||
|
@ -738,9 +735,12 @@ Pin-Priority: 500" | $SUDO tee /etc/apt/preferences.d/limit-unstable > /dev/null
|
||||||
elif [ "$(uname -m)" = "armv6l" ]; then
|
elif [ "$(uname -m)" = "armv6l" ]; then
|
||||||
|
|
||||||
echo "::: Installing WireGuard from source... "
|
echo "::: Installing WireGuard from source... "
|
||||||
PIVPN_DEPS=(checkinstall dkms libmnl-dev libelf-dev raspberrypi-kernel-headers build-essential pkg-config qrencode)
|
PIVPN_DEPS=(checkinstall dkms libmnl-dev libelf-dev raspberrypi-kernel-headers build-essential pkg-config qrencode jq)
|
||||||
installDependentPackages PIVPN_DEPS[@]
|
installDependentPackages PIVPN_DEPS[@]
|
||||||
|
|
||||||
|
WG_SNAPSHOT="$(curl -s https://build.wireguard.com/distros.json | jq -r '."upstream-kmodtools"."version"')"
|
||||||
|
WG_SOURCE="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${WG_SNAPSHOT}.tar.xz"
|
||||||
|
|
||||||
# Delete any leftover code
|
# Delete any leftover code
|
||||||
$SUDO rm -rf /usr/src/wireguard-*
|
$SUDO rm -rf /usr/src/wireguard-*
|
||||||
|
|
||||||
|
@ -804,6 +804,8 @@ Pin-Priority: 500" | $SUDO tee /etc/apt/preferences.d/limit-unstable > /dev/null
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "WG_SNAPSHOT=${WG_SNAPSHOT}" >> /tmp/setupVars.conf
|
||||||
|
|
||||||
elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then
|
elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then
|
||||||
|
|
||||||
echo "::: Installing WireGuard from Debian package... "
|
echo "::: Installing WireGuard from Debian package... "
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# PiVPN: Uninstall Script
|
# PiVPN: Uninstall Script
|
||||||
|
|
||||||
PKG_MANAGER="apt-get"
|
PKG_MANAGER="apt-get"
|
||||||
WG_SNAPSHOT="0.0.20191012"
|
|
||||||
setupVars="/etc/pivpn/setupVars.conf"
|
setupVars="/etc/pivpn/setupVars.conf"
|
||||||
|
|
||||||
if [ ! -f "${setupVars}" ]; then
|
if [ ! -f "${setupVars}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue