Fixed WireGuard installation on Ubuntu when module is not built-in

- PIVPN_DEPS array should be assigned before appending to it,
    not after, to avoid overwriting existing items.
This commit is contained in:
Orazio 2020-09-14 16:19:40 +02:00
parent 551af5f351
commit 03f5871c71

View file

@ -1336,11 +1336,12 @@ installWireGuard(){
echo "::: Installing WireGuard... " echo "::: Installing WireGuard... "
PIVPN_DEPS=(wireguard-tools qrencode)
if [ "$WIREGUARD_BUILTIN" -eq 0 ]; then if [ "$WIREGUARD_BUILTIN" -eq 0 ]; then
PIVPN_DEPS+=(linux-headers-generic wireguard-dkms) PIVPN_DEPS+=(linux-headers-generic wireguard-dkms)
fi fi
PIVPN_DEPS=(wireguard-tools qrencode)
installDependentPackages PIVPN_DEPS[@] installDependentPackages PIVPN_DEPS[@]
fi fi