Score:0

Why did apt install dos2unix restart nginx?

cn flag
# apt install dos2unix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  dos2unix
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 418 kB of archives.
After this operation, 1,540 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu kinetic/universe amd64 dos2unix amd64 7.4.3-1 [418 kB]
Fetched 418 kB in 1s (754 kB/s)   
Selecting previously unselected package dos2unix.
(Reading database ... 113205 files and directories currently installed.)
Preparing to unpack .../dos2unix_7.4.3-1_amd64.deb ...
Unpacking dos2unix (7.4.3-1) ...
Setting up dos2unix (7.4.3-1) ...
Processing triggers for man-db (2.10.2-2) ...
Scanning processes...                                                                                                                                                                                                                        
Scanning candidates...                                                                                                                                                                                                                       
Scanning processor microcode...                                                                                                                                                                                                              
Scanning linux images...                                                                                                                                                                                                                     

The processor microcode seems to be up-to-date.

Restarting services...
 /etc/needrestart/restart.d/systemd-manager
 systemctl restart amplify-agent.service irqbalance.service multipathd.service nginx.service packagekit.service php8.1-fpm.service polkit.service [email protected] rsyslog.service smartmontools.service ssh.service systemd-journald.service systemd-networkd.service systemd-resolved.service systemd-timesyncd.service systemd-udevd.service udisks2.service upower.service uuidd.service
Service restarts being deferred:
 systemctl restart ModemManager.service
 /etc/needrestart/restart.d/dbus.service
 systemctl restart networkd-dispatcher.service
 systemctl restart systemd-logind.service
 systemctl restart unattended-upgrades.service

No containers need to be restarted.

User sessions running outdated binaries:
 root @ session #80: bash[482511,541310,560013,701311,1038016], tmux: server[701357]
 root @ user manager service: systemd[1894]

My website went down for a split second while nginx was being restarted. Why did I not get any warnings about this? How do I prevent nginx from being restarted next time?

HBruijn avatar
in flag
It is unlikely that the installation of dos2unix required services to restart. Possibly there were restarts pending (due to for example unattended-upgrades ) and running apt manually, in interactive mode, triggered those. - Adjusting the [`needrestart`](https://manpages.ubuntu.com/manpages/lunar/en/man1/needrestart.1.html) mode to `(l)ist only` and you should only see notifications about services needing restarts
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.