Skip to content

Commit 61b7085

Browse files
committed
Check if apt-transport-https is installed and switch to ssl for repo.
1 parent e3a151a commit 61b7085

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

install/hst-install-debian.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,21 @@ if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
269269
check_result 1 "User admin exists"
270270
fi
271271

272+
# Update apt repository
273+
apt-get -qq update
274+
272275
# Checking wget
273276
if [ ! -e '/usr/bin/wget' ]; then
274277
apt-get -y install wget
275278
check_result $? "Can't install wget"
276279
fi
277280

281+
# Check if apt-transport-https is installed
282+
if [ ! -e '/usr/lib/apt/methods/https' ]; then
283+
apt-get -y install apt-transport-https
284+
check_result $? "Can't install apt-transport-https"
285+
fi
286+
278287
# Checking repository availability
279288
wget -q "https://$GPG/deb_signing.key" -O /dev/null
280289
check_result $? "No access to Hestia repository"
@@ -486,7 +495,7 @@ wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
486495
apt-key add /tmp/php_signing.key
487496

488497
# Installing hestia repo
489-
echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
498+
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
490499
wget https://gpg.hestiacp.com/deb_signing.key -O deb_signing.key
491500
apt-key add deb_signing.key
492501

install/hst-install-ubuntu.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,21 @@ if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
248248
check_result 1 "User admin exists"
249249
fi
250250

251+
# Update apt repository
252+
apt-get -qq update
253+
251254
# Checking wget
252255
if [ ! -e '/usr/bin/wget' ]; then
253256
apt-get -y install wget
254257
check_result $? "Can't install wget"
255258
fi
256259

260+
# Check if apt-transport-https is installed
261+
if [ ! -e '/usr/lib/apt/methods/https' ]; then
262+
apt-get -y install apt-transport-https
263+
check_result $? "Can't install apt-transport-https"
264+
fi
265+
257266
# Checking repository availability
258267
wget -q "https://$GPG/deb_signing.key" -O /dev/null
259268
check_result $? "No access to Hestia repository"
@@ -467,7 +476,7 @@ wget https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
467476
apt-key add /tmp/php_signing.key
468477

469478
# Installing hestia repo
470-
echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
479+
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
471480
wget https://gpg.hestiacp.com/deb_signing.key -O deb_signing.key
472481
apt-key add deb_signing.key
473482

0 commit comments

Comments
 (0)