-
Notifications
You must be signed in to change notification settings - Fork 1
/
airplay_install.sh
executable file
·31 lines (27 loc) · 1.09 KB
/
airplay_install.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
#!/bin/bash
#--------------------------------------------------------------------
function tst {
echo "===> Executing: $*"
if ! $*; then
echo "Exiting script due to error from: $*"
exit 1
fi
}
#--------------------------------------------------------------------
# Install shairplay-sync from source
tst apt-get -y install build-essential git autoconf automake libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev avahi-daemon libavahi-client-dev libssl-dev libpolarssl-dev libsoxr-dev
tst cd /$HOME
tst git clone https://github.com/mikebrady/shairport-sync.git
tst cd shairport-sync
tst autoreconf -i -f
tst ./configure --sysconfdir=/etc --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd
sleep 1
tst make
sleep 1
getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null
getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null
sleep 1
tst make install
sleep 1
tst systemctl enable shairport-sync
echo "Done! You should reboot now"