Skip to content

Instantly share code, notes, and snippets.

@mandria
Last active April 18, 2020 17:58
Show Gist options
  • Save mandria/113228aa82059c26ca0b66c1d7e8acf3 to your computer and use it in GitHub Desktop.
Save mandria/113228aa82059c26ca0b66c1d7e8acf3 to your computer and use it in GitHub Desktop.

After some trouble to boot icecast on mac osx with launchd this is the workaround i've used:

make an .sh that make start icecast ->


    #!/bin/bash
    sleep 5
    icecast -c  /usr/local/etc/icecast.xml -b

create a launchd com.icecast.plist file to run the script opening terminal instead running it directly also if it's setted to run in background seems that icecast 2.4.x cannot boot if not launched from a graphic tty

<?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>Label</key>
   <string>com.icecast</string>
   <key>Program</key>
   <string>/usr/bin/open</string>
   <key>ProgramArguments</key>
   <array>
   <string>/usr/bin/open</string>
   <string>/Users/youruser/Code/starticecast.sh</string>
   <string>-a</string>
   <string>Terminal</string>
   </array>
   <key>RunAtLoad</key>
   <true/>
   <key>KeepAlive</key>
	 <false/>
</dict>
</plist>

copy the plist file in the folder ~/Library/LaunchAgents/ and load it

launchctl load -w ~/Library/LaunchAgents/com.icecast.plist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment