Recent changes Random page
GAMING
Technology
 
Gaming
Entertainment
Science Fiction
Biggest wikis
Hobbies
Music
See more...

Hack:launchd

From Music Player Daemon Community Wiki

(Redirected from Launchd)
Jump to: navigation, search

[edit] Running mpd on osx using launchd

create a file (mpd.plist) like this one:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com
    /DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Debug</key>
        <false/>
        <key>inetdCompatibility</key>
        <false/>
        <key>Label</key>
        <string>org.macports.mpd</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/opt/local/bin/daemondo</string>
        <key>ProgramArguments</key>
        <array>
                <string>--label=mpd</string>
                <string>--start-cmd</string>
                <string>/opt/local/bin/mpd</string>
                <string>/opt/local/etc/mpd.conf</string>
                <string>;</string>
                <string>--stop-cmd</string>
                <string>/opt/local/bin/mpd</string>
                <string>--kill</string>
                <string>/opt/local/etc/mpd.conf</string>
                <string>;</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
    </plist>

then save it and run launchctl load mpd.plist (or sudo launchctl load mpd.plist) then mpd will be launched

If you place the mpd.plist script in /Library/LaunchDaemons it will launch again when you reboot.

you may need to install daemondo

mpd and daemondo can be installed using macports [1][2]

Rate this article:
Share this article: