Check for gnupg availability
The gnupg package is not available by default in some Ubuntu 18.04 images. Check for it and install if required.
This commit is contained in:
parent
941f27bd2f
commit
eaa24c9b99
1 changed files with 6 additions and 1 deletions
|
@ -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-----
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue