From 87c39beae09d4f61a6fc9ee3d156e06c7c6b34c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu>
Date: Fri, 10 Feb 2017 11:36:52 +0100
Subject: [PATCH] Install apt-transport-https before setting apt proxy.

---
 3.New_server_deployment/4.APT_upgrade/0_setup.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/3.New_server_deployment/4.APT_upgrade/0_setup.sh b/3.New_server_deployment/4.APT_upgrade/0_setup.sh
index aa0c157c..e7fc75a0 100755
--- a/3.New_server_deployment/4.APT_upgrade/0_setup.sh
+++ b/3.New_server_deployment/4.APT_upgrade/0_setup.sh
@@ -1,6 +1,12 @@
 #!/bin/bash
 source /root/envsetup/global-conf.sh
 
+DEBIAN_FRONTEND=noninteractive
+export DEBIAN_FRONTEND
+
+apt-get update
+apt-get install -y apt-transport-https
+
 # move 50unattended-upgrades conf if any
 if [ -f /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist ]; then
 	mv /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist /etc/apt/apt.conf.d/50unattended-upgrades
@@ -23,8 +29,6 @@ if ( ! test -z ${APT_CACHE_URL} ); then
 fi
 
 # update packages
-DEBIAN_FRONTEND=noninteractive
-export DEBIAN_FRONTEND
 apt-get update
 apt-get install -f -y -o Dpkg::Options::="--force-confold"
 apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"
-- 
GitLab