Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save probonopd/2a0ed5e743d54fb73a74 to your computer and use it in GitHub Desktop.

Select an option

Save probonopd/2a0ed5e743d54fb73a74 to your computer and use it in GitHub Desktop.
WORKING SHAIRPORT ON wr703n http://stdio.be/blog/2014-08-26-Shairport-on-TL-WR703N/ for sending AirPlay audio to the TP-Link TL-WR703N
cat > /etc/init.d/shairport <<\EOF
#!/bin/sh /etc/rc.common
NAME='shairport'
START=99
start() {
SPEAKER=$(amixer scontrols | head -n 1 | cut -d "'" -f 2)
amixer sset $SPEAKER '80%' || exit 1
sleep 2
shairport -d -a $(uci get system.@system[0].hostname)
}
stop() {
killall shairport
}
EOF
chmod a+x /etc/init.d/shairport
/etc/init.d/shairport enable
/etc/init.d/shairport start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment