Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2009 13:19:57 +0200
From:      Axel <axel@glemsk.net>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Restarting daemons after portupgrade/portmanager
Message-ID:  <4A6AEA5D.80708@glemsk.net>
In-Reply-To: <4A6AC134.2050101@infracaninophile.co.uk>
References:  <4A6A3C49.4090403@glemsk.net> <4A6AC134.2050101@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for your reply!

I want to make the upgrade process as easy as possible, so I guess that 
I'll set up automated restart of daemons (unless you think it's a bad idea).

Is it okay to send a restart signal using AFTERINSTALL, or should the 
restart wait until after portmanager has updated all dependencies etc (= 
make a shell script)?

Axel

Matthew Seaman wrote:
> Axel wrote:
>   
>> Hello! I have a question concerning port upgrades.
>>
>> mysql51-server stops automatically during upgrade (using portupgrade or 
>> portmanager), and is properly started again based on a AFTERINSTALL 
>> setting in pktools.conf.
>>
>> So far, so good. But what about the other daemons that still seem to run 
>> after upgrade (Apache, Courier IMAP etc)? Are the new version running 
>> fine after the upgrade, or should I set AFTERINSTALL to do a restart of 
>> these daemons, to make sure they run the upgraded version?
>>     
>
> No -- the sample AFTERINSTALL stuff in pkgtools.conf will run any RC
> scripts the package installs to try and start those services.  This will
> have no effect if:
>
>    * The daemon is already running
>
>    * There's no foo_enable="yes" setting in /etc/rc.conf or equivalent.
>
> So daemons like mysql or slapd that get shutdown during the process of
> updating the port will be restarted, but daemons like apache or snmpd
> that don't get shutdown will still be running the old version and you'll
> have to restart them manually, as you will have to configure and start
> anything newly installed.  
>
> 	Cheers,
>
> 	Matthew
>
>   



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A6AEA5D.80708>