Reply To: Startup from Command line possible?

#14426
rpedde
Participant

@punkassjim wrote:

Yeah, that’s what I thought you’d say. Here’s the thing:

On the iPhone, as with anything, we’re trying to get a nice GUI solution together for enabling and disabling services on the fly, just so we’re not walking around with ssh and firefly enabled all the time, serving from our pockets. I’m not a programmer, and I don’t think Greg is either (I may be wrong), so we’re relying on the software of others.

http://web.newsguy.com/marcio/iphone/itoggle/
Enter iToggle. Nice little app for switching things on and off, but it doesn’t use launchd to do its thing, it addresses the daemon directly, with arguments. For one reason or another, Firefly doesn’t seem to work at all when enabling it via iToggle (which simply issues the command Greg posted up in his first post).

I’m beginning to get the feeling we need to track down the developer of iToggle and ask him to change the app so that it does everything through launchd (since we know that works).

If you don’t want to run it via launchd, you can run it without the -x argument. The only issue with that is that then it’s running all the time, rather than only when someone connects.

Which is less useful than running it from launchd, imho — less memory requirements. Running it from launchd is definitely the Right Thing, imho.

So I think that having iToggle work with launchd profiles is probably the win. Or at least give it the option to run an arbitrary command to start and stop services.