[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto restart a service in postinst script (Stretch and newer)

On Sat, 5 Aug 2017 11:56:07 +0900
Mark Fletcher <mark27q1@gmail.com> wrote:

> On Fri, Aug 04, 2017 at 12:30:25PM +0200, Harald Dunkel wrote:
> > 
> > What is the right way to restart a service from the postinst
> > script for Stretch and newer?
> > 
> I may be misunderstanding your question but on a system that has 
> migrated to systemd, you can restart a service with: 
> systemctl restart <service>

I think you missed the point. To run it from a postinst script we
need a universal(!) way to restart a service, regardless whether 
systemd or sysvinit-core or whatever is installed.


Reply to: