[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Restart services after upgrade
Stefano Marinelli <postnet%dragas.dyndns.org@localhost> writes:
> Hello everybody,
> sometimes I use to upgrade my pkgsrc packages using the
> "pkg_rolling-replace -u". It works perfectly but sometimes some
> services start to behave in a weird mode because they've been upgraded
> and not restarted.
> Is there a way to restart those services (or all the services, one per
> time) instead of rebooting the machine?
> Of course I could manually do a "/etc/rc.d/xxx restart" but this
> involves that I should manually check and know which services (and/or
> deps) have been rebuilt.
> Is there a more automatic way?
Check how /etc/rc and /etc/rc.shutdown do that. The code there is clean enough.
for service in $(reverse_list $(rcorder /etc/rc.d/*)); do $(service) stop; done
for service in $(rcorder /etc/rc.d/*); do $(service) start; done
Main Index |
Thread Index |