macports stages - how to stop server processes?

Ryan Schmidt ryandesign at macports.org
Tue Oct 21 01:33:15 PDT 2008


On Oct 21, 2008, at 03:07, Jordan K. Hubbard wrote:

> On Oct 21, 2008, at 12:36 AM, Ryan Schmidt wrote:
>
>> One often has the need to load and unload services at times other  
>> than activating and deactivating a port. For example, ports are  
>> not loaded when they are initially installed, because some initial  
>> setup might need to be done manually by the user first. Then the  
>> user will want to load the port. Or if the user just wants to  
>> restart a service, they will unload and then load it again.
>
> Hmmm.  OK, I can sort of buy that, but if the intention was to  
> expose the de-facto standard service / apachectl / launchctl /  
> pcastctl semantics in some port-generic way, then why wasn't this  
> done as start, stop and restart (as an alias for stop/start)?  That  
> would certainly make more sense to me.

Here is the message where I proposed the feature:

http://lists.macosforge.org/pipermail/macports-dev/2007-November/ 
003515.html

The feature was implemented in these revisions:

http://trac.macports.org/changeset/31500

http://trac.macports.org/changeset/31771

The feature uses launchctl, not apachectl, pcastctl or any other. The  
arguments to launchctl that we use are load and unload, so that's  
what the arguments to the port command were called as well.

We could discuss changing load/unload to start/stop and adding a  
restart command. It was just never brought up before.

It might be confusing that "port start" does not call "launchctl  
start" (it calls "launchctl load") and that "port stop" does not call  
"launchctl stop" (it calls "launchctl unload"). Or maybe it's just  
confusing me since I've been used to "port load" and "port unload"  
for a year now. Since the feature hasn't been in a released version  
of MacPorts it's still easy to rename.



More information about the macports-users mailing list