forked from gtg922r/aircast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
49 lines (39 loc) · 1.57 KB
/
provision.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
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
#make sure the vagrant user is in the audio group
sudo usermod -a -G audio vagrant
#install the newest alsa kernel modules
sudo apt-add-repository ppa:ubuntu-audio-dev/alsa-daily
sudo apt-get update
sudo apt-get install oem-audio-hda-daily-dkms
#reload sound module
sudo modprobe snd-hda-intel
sudo apt-get install -yq git wget autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev alsa-utils
#also do https://wiki.ubuntuusers.de/Soundkarten_konfigurieren/HDA?redirect=no
sudo apt-get -yq remove --purge alsa-base pulseaudio
sudo apt-get -yq install alsa-base pulseaudio
sudo alsa force-reload
echo "options snd-hda-intel model=3stack" | sudo tee -a /etc/modprobe.d/alsa-base.conf
#install shairport-sync
git clone --depth=1 https://github.com/mikebrady/shairport-sync.git
cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-stdout
make
sudo make install
#install python dependencies
sudo apt-get -yq install python-dev python-pip
sudo apt-get -yq install flac libflac-dev
sudo pip install -r /vagrant/requirements.txt
sudo apt-get -yq autoremove
# Install supervisor to auto start Aircast
sudo apt-get -yq install supervisor
cat | sudo tee /etc/supervisor/conf.d/aircast.conf > /dev/null <<- EOM
[program:aircast]
command=python /vagrant/src/main.py --iface=eth1
autostart=true
autorestart=true
stderr_logfile=/var/log/aircast.err.log
stdout_logfile=/var/log/aircast.out.log
username=vagrant
EOM
sudo service supervisor restart