mirror of
https://github.com/pivpn/pivpn.git
synced 2025-01-19 02:54:29 +00:00
- Prepend 'pivpn-' to unstable repo files to limit naming conflicts
- Update variables inside unattended examples - Remove openvpn logging setting when uninstalling the package - Run 'apt-get update' after removing the WireGuard PPA
This commit is contained in:
parent
69606f7207
commit
dba3e6ad3e
4 changed files with 17 additions and 12 deletions
|
@ -990,7 +990,7 @@ installWireGuard(){
|
|||
installDependentPackages PIVPN_DEPS[@]
|
||||
# Do not upgrade packages from the unstable repository except for wireguard
|
||||
echo "::: Adding Debian repository... "
|
||||
echo "deb https://deb.debian.org/debian/ unstable main" | $SUDO tee /etc/apt/sources.list.d/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: 1\n\nPackage: wireguard wireguard-dkms wireguard-tools\nPin: release a=unstable\nPin-Priority: 500\n' | $SUDO tee /etc/apt/preferences.d/limit-unstable > /dev/null
|
||||
|
||||
$SUDO apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
|
||||
|
@ -1093,8 +1093,8 @@ installWireGuard(){
|
|||
|
||||
echo "::: Installing WireGuard from Debian package... "
|
||||
echo "::: Adding Debian repository... "
|
||||
echo "deb https://deb.debian.org/debian/ unstable main" | $SUDO tee /etc/apt/sources.list.d/unstable.list > /dev/null
|
||||
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' | $SUDO tee /etc/apt/preferences.d/limit-unstable > /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
|
||||
# shellcheck disable=SC2086
|
||||
$SUDO ${UPDATE_PKG_CACHE} &> /dev/null
|
||||
PIVPN_DEPS=(linux-headers-amd64 qrencode wireguard wireguard-tools wireguard-dkms)
|
||||
|
|
|
@ -111,11 +111,12 @@ removeAll(){
|
|||
# there is no wireguard package). On Ubuntu, remove the PPA.
|
||||
### FIXME: unconditionally rm'ing unstable.list isn't a good idea, it appears. What if someone else put it there manually?
|
||||
if [ "$PLAT" = "Debian" ] || { [ "$PLAT" = "Raspbian" ] && [ "$(uname -m)" = "armv7l" ]; }; then
|
||||
rm /etc/apt/sources.list.d/unstable.list
|
||||
rm /etc/apt/preferences.d/limit-unstable
|
||||
rm -f /etc/apt/sources.list.d/pivpn-unstable.list
|
||||
rm -f /etc/apt/preferences.d/pivpn-limit-unstable
|
||||
$PKG_MANAGER update &> /dev/null
|
||||
elif [ "$PLAT" = "Ubuntu" ]; then
|
||||
add-apt-repository ppa:wireguard/wireguard -r -y
|
||||
$PKG_MANAGER update &> /dev/null
|
||||
fi
|
||||
|
||||
elif [ "${i}" = "wireguard-dkms" ]; then
|
||||
|
@ -148,7 +149,11 @@ removeAll(){
|
|||
rm -rf /etc/apt/apt.conf.d/*unattended-upgrades
|
||||
|
||||
elif [ "${i}" = "openvpn" ]; then
|
||||
deluser openvpn
|
||||
|
||||
deluser openvpn
|
||||
rm -f /etc/rsyslog.d/30-openvpn.conf
|
||||
rm -f /etc/logrotate.d/openvpn
|
||||
|
||||
fi
|
||||
printf ":::\\tRemoving %s..." "$i"; $PKG_MANAGER -y remove --purge "$i" &> /dev/null & spinner $!; printf "done!\\n";
|
||||
break
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
IPv4dev=eth0
|
||||
staticReserv=0
|
||||
dhcpReserv=0
|
||||
install_user=pi
|
||||
VPN=openvpn
|
||||
pivpnPROTO=udp
|
||||
pivpnPORT=1194
|
||||
pivpnDNS1=8.8.8.8
|
||||
pivpnDNS2=8.8.4.4
|
||||
pivpnDNS1=9.9.9.9
|
||||
pivpnDNS2=149.112.112.112
|
||||
pivpnHOST=pivpn.example.com
|
||||
pivpnENCRYPT=2048
|
||||
pivpnSEARCHDOMAIN=searchdomain.example.com
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
IPv4dev=eth0
|
||||
staticReserv=0
|
||||
dhcpReserv=0
|
||||
install_user=pi
|
||||
VPN=wireguard
|
||||
pivpnPORT=51820
|
||||
pivpnDNS1=8.8.8.8
|
||||
pivpnDNS2=8.8.4.4
|
||||
pivpnDNS1=9.9.9.9
|
||||
pivpnDNS2=149.112.112.112
|
||||
pivpnHOST=pivpn.example.com
|
||||
UNATTUPG=1
|
||||
|
|
Loading…
Reference in a new issue