Explorar o código

Check if apt-transport-https is installed and switch to ssl for repo.

Raphael Schneeberger %!s(int64=7) %!d(string=hai) anos
pai
achega
61b7085184
Modificáronse 2 ficheiros con 20 adicións e 2 borrados
  1. 10 1
      install/hst-install-debian.sh
  2. 10 1
      install/hst-install-ubuntu.sh

+ 10 - 1
install/hst-install-debian.sh

@@ -269,12 +269,21 @@ if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
     check_result 1 "User admin exists"
 fi
 
+# Update apt repository
+apt-get -qq update
+
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     apt-get -y install wget
     check_result $? "Can't install wget"
 fi
 
+# Check if apt-transport-https is installed
+if [ ! -e '/usr/lib/apt/methods/https' ]; then
+    apt-get -y install apt-transport-https
+    check_result $? "Can't install apt-transport-https"
+fi
+
 # Checking repository availability
 wget -q "https://$GPG/deb_signing.key" -O /dev/null
 check_result $? "No access to Hestia repository"
@@ -486,7 +495,7 @@ wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
 apt-key add /tmp/php_signing.key
 
 # Installing hestia repo
-echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
+echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 wget https://gpg.hestiacp.com/deb_signing.key -O deb_signing.key
 apt-key add deb_signing.key
 

+ 10 - 1
install/hst-install-ubuntu.sh

@@ -248,12 +248,21 @@ if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
     check_result 1 "User admin exists"
 fi
 
+# Update apt repository
+apt-get -qq update
+
 # Checking wget
 if [ ! -e '/usr/bin/wget' ]; then
     apt-get -y install wget
     check_result $? "Can't install wget"
 fi
 
+# Check if apt-transport-https is installed
+if [ ! -e '/usr/lib/apt/methods/https' ]; then
+    apt-get -y install apt-transport-https
+    check_result $? "Can't install apt-transport-https"
+fi
+
 # Checking repository availability
 wget -q "https://$GPG/deb_signing.key" -O /dev/null
 check_result $? "No access to Hestia repository"
@@ -467,7 +476,7 @@ wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
 apt-key add /tmp/php_signing.key
 
 # Installing hestia repo
-echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
+echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 wget https://gpg.hestiacp.com/deb_signing.key -O deb_signing.key
 apt-key add deb_signing.key