Просмотр исходного кода

Added gnupg2 check to prevent issues with pubkey installation.

Raphael Schneeberger 6 лет назад
Родитель
Сommit
5ea86c0d9d
3 измененных файлов с 15 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 7 0
      install/hst-install-debian.sh
  3. 7 0
      install/hst-install-ubuntu.sh

+ 1 - 0
CHANGELOG.md

@@ -37,6 +37,7 @@ All notable changes to this project will be documented in this file.
 - Fixed cronjob issue with sftp jail due to missing user.
 - Fixed issue #569 Remote backup hostname would reject ip addr without reverse dns (PTR record).
 - Create a couple of writeable folders in each user home directory (#580).
+- Added gnupg2 check to prevent issues with pubkey installation.
 
 ## [1.0.5] - 2019-08-06 - Hotfix
 ### Bugfixes

+ 7 - 0
install/hst-install-debian.sh

@@ -343,6 +343,13 @@ if [ ! -e '/usr/lib/apt/methods/https' ]; then
     check_result $? "Can't install apt-transport-https"
 fi
 
+# Check if gnupg2 is installed
+if [ ! -e '/usr/bin/gnupg2' ]; then
+    echo "(*) Installing gnupg2..."
+    apt-get -y install gnupg2 >> $LOG
+    check_result $? "Can't install gnupg2"
+fi
+
 # Check if apparmor is installed
 if [ $(dpkg-query -W -f='${Status}' apparmor 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
     apparmor='no'

+ 7 - 0
install/hst-install-ubuntu.sh

@@ -317,6 +317,13 @@ if [ ! -e '/usr/bin/apt-add-repository' ]; then
     check_result $? "Can't install software-properties-common"
 fi
 
+# Check if gnupg2 is installed
+if [ ! -e '/usr/bin/gnupg2' ]; then
+    echo "(*) Installing gnupg2..."
+    apt-get -y install gnupg2 >> $LOG
+    check_result $? "Can't install gnupg2"
+fi
+
 # Check repository availability
 wget --quiet "https://$GPG/deb_signing.key" -O /dev/null
 check_result $? "Unable to connect to the Hestia APT repository"