Files
runner-images/images/linux/scripts/base/apt.sh
T

33 lines
1.0 KiB
Bash
Raw Normal View History

2020-10-24 23:30:27 +07:00
#!/bin/bash -e
# Stop and disable apt-daily upgrade services;
systemctl stop apt-daily.timer
systemctl disable apt-daily.timer
systemctl disable apt-daily.service
systemctl stop apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.timer
systemctl disable apt-daily-upgrade.service
2020-07-08 22:28:23 +03:00
# Enable retry logic for apt up to 10 times
2020-11-05 15:53:49 +03:00
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80-retries
2020-07-08 22:28:23 +03:00
# Configure apt to always assume Y
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
2020-11-11 21:47:51 +03:00
# Uninstall unattended-upgrades
2021-01-13 04:07:02 -05:00
apt-get purge unattended-upgrades
2020-11-11 21:47:51 +03:00
2020-09-08 14:40:56 +03:00
# Use apt-fast for parallel downloads
2020-07-08 22:28:23 +03:00
add-apt-repository -y ppa:apt-fast/stable
# Need to limit arch for default apt repos due to
# https://github.com/actions/virtual-environments/issues/1961
sed -i'' -E 's/^deb http:\/\/(azure.archive|security).ubuntu.com/deb [arch=amd64,i386] http:\/\/\1.ubuntu.com/' /etc/apt/sources.list
echo 'APT sources limited to the actual architectures'
cat /etc/apt/sources.list
2020-07-08 22:28:23 +03:00
apt-get update
2020-11-19 14:59:15 +05:30
# Install aria2 , jq and apt-fast
apt-get install aria2 jq apt-fast