mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 20:00:16 +00:00
Inform the user when updating the package cache, which can be slow on some RPis
This commit is contained in:
parent
d1a781075a
commit
b12996df37
3 changed files with 10 additions and 3 deletions
|
@ -1049,6 +1049,7 @@ installOpenVPN(){
|
||||||
installDependentPackages PIVPN_DEPS[@]
|
installDependentPackages PIVPN_DEPS[@]
|
||||||
wget -qO- https://swupdate.openvpn.net/repos/repo-public.gpg | $SUDO apt-key add -
|
wget -qO- https://swupdate.openvpn.net/repos/repo-public.gpg | $SUDO apt-key add -
|
||||||
echo "deb https://build.openvpn.net/debian/openvpn/stable $OSCN main" | $SUDO tee /etc/apt/sources.list.d/pivpn-openvpn-repo.list > /dev/null
|
echo "deb https://build.openvpn.net/debian/openvpn/stable $OSCN main" | $SUDO tee /etc/apt/sources.list.d/pivpn-openvpn-repo.list > /dev/null
|
||||||
|
echo "::: Updating package cache..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
fi
|
fi
|
||||||
|
@ -1081,6 +1082,7 @@ installWireGuard(){
|
||||||
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 1\n\nPackage: wireguard wireguard-dkms wireguard-tools\nPin: release a=unstable\nPin-Priority: 500\n' | $SUDO tee /etc/apt/preferences.d/pivpn-limit-unstable > /dev/null
|
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 1\n\nPackage: wireguard wireguard-dkms wireguard-tools\nPin: release a=unstable\nPin-Priority: 500\n' | $SUDO tee /etc/apt/preferences.d/pivpn-limit-unstable > /dev/null
|
||||||
|
|
||||||
$SUDO apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
|
$SUDO apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
|
||||||
|
echo "::: Updating package cache..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
PIVPN_DEPS=(raspberrypi-kernel-headers wireguard wireguard-tools wireguard-dkms)
|
PIVPN_DEPS=(raspberrypi-kernel-headers wireguard wireguard-tools wireguard-dkms)
|
||||||
|
@ -1182,6 +1184,7 @@ installWireGuard(){
|
||||||
echo "::: Adding Debian repository... "
|
echo "::: Adding Debian repository... "
|
||||||
echo "deb https://deb.debian.org/debian/ unstable main" | $SUDO tee /etc/apt/sources.list.d/pivpn-unstable.list > /dev/null
|
echo "deb https://deb.debian.org/debian/ unstable main" | $SUDO tee /etc/apt/sources.list.d/pivpn-unstable.list > /dev/null
|
||||||
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' | $SUDO tee /etc/apt/preferences.d/pivpn-limit-unstable > /dev/null
|
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' | $SUDO tee /etc/apt/preferences.d/pivpn-limit-unstable > /dev/null
|
||||||
|
echo "::: Updating package cache..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
PIVPN_DEPS=(linux-headers-amd64 qrencode wireguard wireguard-tools wireguard-dkms)
|
PIVPN_DEPS=(linux-headers-amd64 qrencode wireguard wireguard-tools wireguard-dkms)
|
||||||
|
@ -1191,6 +1194,7 @@ installWireGuard(){
|
||||||
|
|
||||||
echo "::: Installing WireGuard from PPA... "
|
echo "::: Installing WireGuard from PPA... "
|
||||||
$SUDO add-apt-repository ppa:wireguard/wireguard -y
|
$SUDO add-apt-repository ppa:wireguard/wireguard -y
|
||||||
|
echo "::: Updating package cache..."
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
PIVPN_DEPS=(qrencode wireguard wireguard-tools wireguard-dkms linux-headers-generic)
|
PIVPN_DEPS=(qrencode wireguard wireguard-tools wireguard-dkms linux-headers-generic)
|
||||||
|
|
|
@ -114,9 +114,11 @@ removeAll(){
|
||||||
if [ "$PLAT" = "Debian" ] || { [ "$PLAT" = "Raspbian" ] && [ "$(uname -m)" = "armv7l" ]; }; then
|
if [ "$PLAT" = "Debian" ] || { [ "$PLAT" = "Raspbian" ] && [ "$(uname -m)" = "armv7l" ]; }; then
|
||||||
rm -f /etc/apt/sources.list.d/pivpn-unstable.list
|
rm -f /etc/apt/sources.list.d/pivpn-unstable.list
|
||||||
rm -f /etc/apt/preferences.d/pivpn-limit-unstable
|
rm -f /etc/apt/preferences.d/pivpn-limit-unstable
|
||||||
|
echo "::: Updating package cache..."
|
||||||
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
elif [ "$PLAT" = "Ubuntu" ]; then
|
elif [ "$PLAT" = "Ubuntu" ]; then
|
||||||
add-apt-repository ppa:wireguard/wireguard -r -y
|
add-apt-repository ppa:wireguard/wireguard -r -y
|
||||||
|
echo "::: Updating package cache..."
|
||||||
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -153,6 +155,7 @@ removeAll(){
|
||||||
|
|
||||||
if [ "$PLAT" = "Debian" ] || [ "$PLAT" = "Ubuntu" ]; then
|
if [ "$PLAT" = "Debian" ] || [ "$PLAT" = "Ubuntu" ]; then
|
||||||
rm -f /etc/apt/sources.list.d/pivpn-openvpn-repo.list
|
rm -f /etc/apt/sources.list.d/pivpn-openvpn-repo.list
|
||||||
|
echo "::: Updating package cache..."
|
||||||
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
${UPDATE_PKG_CACHE} &> /dev/null & spinner $!
|
||||||
fi
|
fi
|
||||||
deluser openvpn
|
deluser openvpn
|
||||||
|
|
Loading…
Reference in a new issue