# How do I find which services and programs to restart after a 'freebsd-update install'?



## Swapjim (Oct 2, 2015)

After I run `freebsd-update fetch` I get a long list of files (example) that will get updated with a `freebsd-update install`.

For some of them, it's obvious that it's a service I need to restart (like sshd(8)). But for others, it's not.

What if there is a vulnerable process of csh(1) running?

How about libraries. How do I know which programs use that library so that I can restart them to use the updated one?

Am I supposed to do a reboot?


----------



## UnixRocks (Oct 2, 2015)

Hello Swapjim. Perhaps you are looking for something like this? https://mebsd.com/make-build-your-f...-freebsd-ensure-all-services-are-running.html


----------



## SirDice (Oct 2, 2015)

Swapjim said:


> Am I supposed to do a reboot?


Yes. You'd also need to reboot if the kernel is updated. So it's best to just always reboot after running freebsd-update(8).


----------



## Swapjim (Oct 8, 2015)

I'm a bit disapointed. I thought that there would be a way to avoid a full reboot.

I hope that you'll take no offence if I ask on the mailing list if someone has found a way not to restart - a script perhaps.



UnixRocks said:


> Hello Swapjim. Perhaps you are looking for something like this? https://mebsd.com/make-build-your-f...-freebsd-ensure-all-services-are-running.html



This might came in handy ;-)

Thank you, both!


----------



## SirDice (Oct 8, 2015)

It all depends what gets updated. In principle you'd only need to restart a service if it (or parts of it) are updated. As there's no way to tell beforehand you have to look for it yourself. For example the last security update updated rpcbind. If you don't use it you don't need to restart anything. If you use NFS it's likely you do need to restart it. And perhaps other services that depend on it may need to be restarted too. In short, safest bet, just reboot. Screw uptimes. They're not important.


----------



## kpa (Oct 8, 2015)

Once we get base system packaged with pkg(8) (supposedly in FreeBSD 11) it might become possible to have control over service restarts on updates but not before.


----------



## Swapjim (Oct 8, 2015)

SirDice said:


> It all depends what gets updated. In principle you'd only need to restart a service if it (or parts of it) are updated. As there's no way to tell beforehand you have to look for it yourself. For example the last security update updated rpcbind. If you don't use it you don't need to restart anything. If you use NFS it's likely you do need to restart it. And perhaps other services that depend on it may need to be restarted too. In short, safest bet, just reboot. Screw uptimes. They're not important.



But but! Uptimes are our e-pride! (in reluctance to use a more streetwise word )



kpa said:


> Once we get base system packaged with pkg(8) (supposedly in FreeBSD 11) it might become possible to have control over service restarts on updates but not before.



That sounds great! Can't wait.


----------

