-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·79 lines (60 loc) · 1.46 KB
/
setup.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
hostname=`cat /etc/hostname`
cur_dir=`pwd`
# check sudo
sudo ls -al >> /dev/null
# Mopidy sources
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list
# apt
sudo apt-get update
# sudo apt-get purge -y python python-dev python-pip
sudo sleep 5
sudo apt-get -y dist-upgrade
sudo sleep 5
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -y autoremove
sudo sleep 5
sudo apt-get install -y \
mopidy \
git \
python3 \
python3-dev \
python3-pip \
python3-spotify \
libffi-dev \
python-pip \
python-dev \
libpython-dev \
libspotify12 \
libspotify-dev \
python3-rpi.gpio \
mopidy-spotify
sudo sleep 5
# pip
sudo pip3 install evdev python-mpd2 Mopidy-Iris pyspotify
sudo pip install evdev python-mpd2 Mopidy-Iris pyspotify
# mopidy config
sudo mv /etc/mopidy/mopidy.conf /etc/mopidy/mopidy.bak
sudo touch /etc/mopidy/mopidy.conf
sudo chown mopidy:root /etc/mopidy/mopidy.conf
sudo conf/mopidy.conf
# alsa config anlegen
sudo cp conf/asound.conf /etc/asound.conf
if [ -f $cur_dir/conf/spotify.conf ]
then
sudo conf/spotify.conf
else
echo ""
echo "Wenn Spotify in Mopidy genutzt werden soll, bitte die Datei
$cur_dir/conf/spotify.template beachten."
echo ""
fi
if [ ! -f plist.csv ]
then
echo ""
echo "Bitte plist.template beachten!"
fi
sudo systemctl enable mopidy
sudo service mopidy restart