set -ex | |
# Disable unattended upgrades | |
sed -i 's/APT::Periodic::Unattended-Upgrade "1"/APT::Periodic::Unattended-Upgrade "0"/' /etc/apt/apt.conf.d/20auto-upgrades | |
sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/g' /etc/apt/apt.conf.d/* | |
apt update | |
DEBIAN_FRONTEND=noninteractive apt install -y \ | |
linux-headers-${KERNEL_VERSION} \ | |
linux-image-${KERNEL_VERSION} | |
echo "Kernel is installed." |