install gnupg2 if it's not installed

This commit is contained in:
dpeca 2019-08-25 22:30:20 +02:00 committed by GitHub
commit f3b15c5834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -279,6 +279,11 @@ if [ ! -e '/usr/bin/wget' ]; then
check_result $? "Can't install wget"
fi
# Check if gnupg2 is installed
if [ $(dpkg-query -W -f='${Status}' gnupg2 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
apt -y install gnupg2
fi
# Check if apparmor is installed
# This check is borrowed from HestiaCP
if [ $(dpkg-query -W -f='${Status}' apparmor 2>/dev/null | grep -c "ok installed") -eq 0 ]; then