Add fix: "apt-get upgrade auto restart services" to vm-tweaks.sh

This commit is contained in:
Johan 2023-01-13 09:53:15 +01:00
parent e08c7ccabe
commit c16fdb2ecf

View File

@ -16,4 +16,8 @@ if [ ! -f "/etc/cloud/cloud-init.disabled" ]; then
touch /etc/cloud/cloud-init.disabled
fi
# Fix: apt-get upgrade auto restart services
# https://askubuntu.com/questions/1367139/apt-get-upgrade-auto-restart-services
sed -i -e "s/#\$nrconf{restart} = 'i';/\$nrconf{restart} = 'a';/g" /etc/needrestart/needrestart.conf
echo 'Installation complete. You should reboot to apply changes.'