Whenever I shutdown/reboot my server I will typically upgrade packages and kernal before issuing shutdown/reboot commands. Apt has this behavior however where it will restart services after upgrading packages, and one service in particular takes a long time to start/stop (I’m looking at you Team City).
Is there a way to disable these automatic service restarts? They’re useless considering that the whole operating system will be restarting anyway and it’s annoying having to wait the extra 4 mins to start the reboot.
Potentially relevant info:
Ubuntu 24.01.1
apt 2.7.14
systemd 255 (255.4-1ubuntu8.5)
Update.sh
#!/bin/bash
apt update
apt upgrade -y
apt autoremove -y
if [ -f /var/run/reboot-required ]; then
echo 'reboot required'
fi