TL;DR: Is there a way to disable the Pow server from starting when my machine boots up, but retain the ability to launch the server manually via powder up
when I need it to run?
I am using Pow for my local development (and managing via the Powder gem). I'd like to set up Pow so that the server isn't started automatically on boot, as running it drains my battery life and I'm not always coding.
Pow has added itself to launchd
and I can't seem to get to a scenario where the Pow server is not running after startup, but can still be run via a powder up
or other equivalent command when I need to launch the server.
What I've tried that hasn't worked:
cx.pow.powd
process via launchctl unload -w ~/Library/LaunchAgents/cx.pow.powd
prevents Pow from booting on start, but also prevents the process from being started manually when I need itRunAtLoad
to NO
in the cx.pow.powd.plist file also didn't work, later realized that this was not for controlling startup behavior of the daemon.Forgot to post the answer I ended up figuring out.
Turns out this is pretty straightforward actually, and quite easy with the help of Lunchy (friendly wrapper for launchctl) and a quick bit o' bash aliasing. A little hacky and I don't know launchctl very well, but this does the trick.
Steps (assumes Lunchy and Pow already installed):
lunchy stop -w pow
: this will stop Pow, and mark the service as disabled in launchctl, so Pow will not load when the machine starts. (This is same net effect of my initial attempts from the question.).bash_profile
(or .profile
, etc) to force start the service. => alias pu='lunchy start -F pow'
When you restart your machine, Pow should be stopped, and running pu
(or your alias name) should start it up. You can see the list of services running before/after by running lunchy status
.
It's also a hacky but effective way to be able to start/stop groups of services you need for devlopment but don't necessarily want running the rest of the time (mongo, redis, etc).