Date: Mon, 25 Sep 2006 09:27:10 -0400 From: Randy Pratt <bsd-unix@earthlink.net> To: Erwin Van de Velde <erwin.vandevelde@ua.ac.be> Cc: freebsd-ports@freebsd.org Subject: Re: Restarting services Message-ID: <20060925092710.d340d816.bsd-unix@earthlink.net> In-Reply-To: <200609251035.15484.erwin.vandevelde@ua.ac.be> References: <200609251035.15484.erwin.vandevelde@ua.ac.be>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Sep 2006 10:35:15 +0200 Erwin Van de Velde <erwin.vandevelde@ua.ac.be> wrote: > Dear all, > > Almost every port containing a service stops the service before updating but > does not restart it afterwards. I was wondering how difficult it can be to > restart the updated service after installing the files? In my opinion, it > would be less error-prone than hoping for the administrator to remember > restarting all updated services... > While this depends on every port maintainer, a general guideline about this > would help and encourage maintainers to do this. I took a look at /usr/local/etc/pkgtools.conf and it may be possible to do what you want from there. I noticed pre-defined functions like: # cmd_start_rc(origin_or_pkgname) # Returns a command line string that starts the services of the # given package, if any. (Yields "start" for each enabled rc # script) # cmd_restart_rc(origin_or_pkgname) # Returns a command line string that restarts the services of the # given package, if any. (Yields "stop", sleeps for 3 seconds, then # yields "start" for each enabled rc script) There is also a provision for running commands "AFTERINSTALL". However, I have not used these so there may be some aspects of it that I'm overlooking but its probably worth consideration. Randy --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060925092710.d340d816.bsd-unix>