-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-air-pi.sh
executable file
·36 lines (29 loc) · 933 Bytes
/
install-air-pi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# This script will install the Shairport Airplay emulator for Raspberry Pi
# Install deps
sudo apt-get install -y git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl libavahi-client-dev libasound2-dev libpulse-dev
# Install perl net sdp
git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp
cd perl-net-sdp
perl Build.PL
sudo ./Build
sudo ./Build test
sudo ./Build install
cd ~
# Install shairport
git clone [email protected]:abrasive/shairport.git
cd shairport
./configure
make
# Optionally install it to run at boot
sudo make install
cp shairport.init.sample /etc/init.d/shairport
cd /etc/init.d
chmod a+x shairport
update-rc.d shairport defaults
echo "change DAEMON_ARGS to -w \$PIDFILE -a AirPi"
read -p "Press any key to continue..."
sudo nano shairport
# Start up Airplay
./shairport -a AirPi &
echo "Airplay started as device: AirPi"