MAC OS X & b3: run at system boot

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #516
    doppler
    Guest

    Dear group,

    I’m kinda new to the Mac game, having recently bought a 20″ iMac…

    Using the latest beta (b3, with the new all-contained preferences pane), is it possible to have the firefly server run at system boot time (i.e., all the time) instead of at user login?

    Should I tinker with the StartupItems folder? (if so, sample code would be highly appreciated)

    thank you,
    kind regards,
    doppler.

    #5982
    rpedde
    Participant

    @doppler wrote:

    Using the latest beta (b3, with the new all-contained preferences pane), is it possible to have the firefly server run at system boot time (i.e., all the time) instead of at user login?

    Should I tinker with the StartupItems folder? (if so, sample code would be highly appreciated)

    Probably could. The keys would probably include installing it for “all users” rather than your particular user, and setting it to be manually started, rather than automatically started.

    Once you have that, you’ll need to be able to manually start the thing. Something like:


    /Library/PreferencePanes/Firefly.prefPane/Contents/Resources/Firefly Helper.app/Contents/Resources/Server/firefly -a -c firefly.conf

    is probably pretty close to what you’d need to actually run it.

    Once you have that, you need to make a startup script thingie for it. There are some pre-packaged ones here, but I haven’t tried them.

    Probably they would have to be modified to use the command line above, as they are meant to be used with a hand-compiled version from fink.

    Sorry I don’t have a straight answer on this. Perhaps I will in the next couple days, though — I have an xserve at work I need to set up with it, so I’ll probably be going through the same thing myself.

    If you get anything based on the stuff here, I’d appreciate any corrections or tips, as I’ll be wanting them, too. 🙂

    — Ron

    #5983
    doppler
    Guest

    Ron,

    thanks for the reply.

    I ended up adding a .plist into the /Library/LaunchDaemons directory with this content:



    Label
    FireflyService
    OnDemand
    UserName
    root
    Program
    /bin/sh
    ProgramArguments

    /bin/sh
    /startup_script.sh

    RunAtLoad

    Where the startup_script.sh is temporarily placed at the root level. The script does nothin more than calling the code you pasted above (calling the firefly app with the config file).

    This has the effect of starting up 2 firefly processes when the system boots. My local iTunes can see the server just fine, but the soundbridge reports “Incompatible Music Server found”, and I _can’t_ browse to the server over the web interface (hardcoded port 9999): http://localhost:9999 returns 404

    So, a partial success, and maybe you know how to fix these things?

    thanks a lot!

    #5984
    rpedde
    Participant

    @doppler wrote:

    Ron,

    thanks for the reply.

    I ended up adding a .plist into the /Library/LaunchDaemons directory with this content:



    Label
    FireflyService
    OnDemand
    UserName
    root
    Program
    /bin/sh
    ProgramArguments

    /bin/sh
    /startup_script.sh

    RunAtLoad

    Where the startup_script.sh is temporarily placed at the root level. The script does nothin more than calling the code you pasted above (calling the firefly app with the config file).

    This has the effect of starting up 2 firefly processes when the system boots. My local iTunes can see the server just fine, but the soundbridge reports “Incompatible Music Server found”, and I _can’t_ browse to the server over the web interface (hardcoded port 9999): http://localhost:9999 returns 404

    So, a partial success, and maybe you know how to fix these things?

    thanks a lot!

    Sounds like it’s not loading the plugins right — like it isn’t getting the rsp.so.

    Check that config and make sure that in the [plugin] section, it lists rsp.so as one of the plugins= items. You could always hardcode the path to the plugin_dir, in that config file as well. that might do it.

    — Ron

    #5985
    doppler
    Guest

    Ron,

    working perfectly now! Just had to hardcode some paths in there…

    thanks a lot!

    #5986
    Niklaus
    Participant

    doppler,
    can you please give an update what you needed to change to get it to work? I have the same problem as you.
    Thanks in advance

    #5987
    doppler
    Guest

    Niklaus,

    I just installed firefly server for my user (you don’t have to share it for everyone), and I hardcoded in all the paths in the firefly.conf file.

    Then I create a FireflyService.plist file in /Library/LaunchDaemons (to make this run as root). The contents are:



    Label
    FireflyService
    OnDemand
    UserName
    root
    Program
    /bin/sh
    ProgramArguments

    /bin/sh
    /startup_script.sh

    RunAtLoad

    Where startup_script.sh contains nothing more than:

    /path.to.firefly/firefly -c /path.to.firefly/firefly.conf

    Hope this helps!

    #5988
    cfellers
    Participant

    I’ve been trying to get this work all day on my OSX box using the code from above and hardcoding all of the links in the firefly.conf file. I’ve tried starting it with -c firefly.conf and -c /full-path-to/firefly.conf. I’ve tried installing for only me and for everyone, with the same results. The only response I get is ‘Error reading config file (mt-daapd.conf)’. This is using the 1359 nightly build. When I use the Prefs Pane to start the Firefly server, it works perfect and plays in my iTunes clients. I’m at my wits end on this.

    Cody

    #5989
    rpedde
    Participant

    @cfellers wrote:

    I’ve been trying to get this work all day on my OSX box using the code from above and hardcoding all of the links in the firefly.conf file. I’ve tried starting it with -c firefly.conf and -c /full-path-to/firefly.conf. I’ve tried installing for only me and for everyone, with the same results. The only response I get is ‘Error reading config file (mt-daapd.conf)’. This is using the 1359 nightly build. When I use the Prefs Pane to start the Firefly server, it works perfect and plays in my iTunes clients. I’m at my wits end on this.

    Cody

    There is a bug in the current firefly for long paths. It’s fixed in svn, and will be present in the next nightly. That will probably be tomorrow at http://nightlies.mt-daapd.org

    — Ron

    #5990
    cfellers
    Participant

    I finally got it work after adjusting permissions on a couple of things. I moved the firefly.conf file to /etc, the songs.db and firefly.log to /Library/Application Support/Firefly. Then I created the startup file in launchd and it fired right up.

    Cody

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.