mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 07:46:57 +00:00
* remove unattended upgrades package * comment Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
30 lines
973 B
Bash
30 lines
973 B
Bash
#!/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
|
|
|
|
# This step should completely disable any automatic updates except manual
|
|
sudo sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/20auto-upgrades
|
|
|
|
# Enable retry logic for apt up to 10 times
|
|
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80-retries
|
|
|
|
# Configure apt to always assume Y
|
|
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
|
|
|
|
# Uninstall unattended-upgrades
|
|
apt-get remove unattended-upgrades
|
|
|
|
# Install aria2 and jq
|
|
apt-get install aria2
|
|
apt-get install jq
|
|
# Use apt-fast for parallel downloads
|
|
add-apt-repository -y ppa:apt-fast/stable
|
|
apt-get update
|
|
apt-get install apt-fast
|