Skip to content

Commit

Permalink
Check for gnupg availability
Browse files Browse the repository at this point in the history
The gnupg package is not available by default in some Ubuntu 18.04 images. Check for it and install if required.
  • Loading branch information
Nyr committed Apr 30, 2020
1 parent 941f27b commit eaa24c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wireguard-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,12 @@ if [[ ! -e /etc/wireguard/wg0.conf ]]; then
apt-get install -y wireguard qrencode
elif [[ "$os" == "ubuntu" && "$os_version" -eq 1804 ]]; then
# Ubuntu 18.04
# Repo is added manually so we don't depend on add-apt-repository
# Repo is added manually so we don't depend on add-apt-repository.
# gnupg is required to add the repo, we install it if not already present.
if ! dpkg -s gnupg &>/dev/null; then
apt-get update
apt-get install -y gnupg
fi
apt-key add - << EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Expand Down

0 comments on commit eaa24c9

Please sign in to comment.