bsd-unix at earthlink.net
Mon Sep 25 06:24:58 PDT 2006
On Mon, 25 Sep 2006 10:35:15 +0200
Erwin Van de Velde <erwin.vandevelde at 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:
# Returns a command line string that starts the services of the
# given package, if any. (Yields "start" for each enabled rc
# 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.
More information about the freebsd-ports